Fix Coverity ID 453
authorVolker Lendecke <vl@samba.org>
Sun, 23 Mar 2008 16:49:04 +0000 (17:49 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 23 Mar 2008 17:28:23 +0000 (18:28 +0100)
source/libgpo/gpo_ini.c

index d8f14b609f3a965ed297b88ef1a6bd9f77a90cdd..6f1593c2c22264fd497bc722cecc269534faa71e 100644 (file)
@@ -51,7 +51,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
                                       const char *filename_in,
                                       char **filename_out)
 {
-       int tmp_fd = 0;
+       int tmp_fd = -1;
        uint8 *data_in = NULL;
        uint8 *data_out = NULL;
        char *tmp_name = NULL;
@@ -112,7 +112,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
        status = NT_STATUS_OK;
 
  out:
-       if (tmp_fd) {
+       if (tmp_fd != -1) {
                close(tmp_fd);
        }