Fix Coverity ID 913 (NEGATIVE_RETURNS) -- gd, please check!
[ira/wip.git] / 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);
        }