From: Volker Lendecke Date: Sun, 23 Mar 2008 16:49:04 +0000 (+0100) Subject: Fix Coverity ID 453 X-Git-Tag: samba-3.3.0pre1~3149 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f875674e7cf9ebd405561b1e3ab72b0284ce321;p=thirdparty%2Fsamba.git Fix Coverity ID 453 --- diff --git a/source/libgpo/gpo_ini.c b/source/libgpo/gpo_ini.c index d8f14b609f3..6f1593c2c22 100644 --- a/source/libgpo/gpo_ini.c +++ b/source/libgpo/gpo_ini.c @@ -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); }