[CRIU] [PATCH 3/4] shmem: restore_shmem_content -- Use close_safe

Cyrill Gorcunov gorcunov at openvz.org
Thu Apr 11 18:16:59 EDT 2013


Don't call close() with degative fd. For consistency
simply use close_safe here. All fds touched are initialized
either to valid fd or to value < 0 which pretty good handled
by close_safe helper.

CID 996212 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
10. negative_returns: "fd" is passed to a parameter that cannot be negative.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 shmem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-shmem-restore_shmem_content-Use-close_safe.patch
Type: text/x-patch
Size: 369 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130412/aa9344a6/attachment.bin>


More information about the CRIU mailing list