Fix Coverity ID 913 (NEGATIVE_RETURNS) -- gd, please check!
authorVolker Lendecke <vl@samba.org>
Sun, 3 May 2009 21:05:11 +0000 (23:05 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 3 May 2009 21:06:01 +0000 (23:06 +0200)
source3/libgpo/gpo_filesync.c

index d4b623ad6e13dd0735d3941fa0cc3ed82184d4ed..85323c12c90acf00cd5f76e9d76121748950b209 100644 (file)
@@ -40,7 +40,7 @@ NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
 {
        NTSTATUS result;
        uint16_t fnum;
-       int fd = 0;
+       int fd = -1;
        char *data = NULL;
        static int io_bufsize = 64512;
        int read_size = io_bufsize;
@@ -82,7 +82,7 @@ NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
        if (fnum) {
                cli_close(cli, fnum);
        }
-       if (fd) {
+       if (fd != -1) {
                close(fd);
        }