]> git.kaiwu.me - nginx.git/commitdiff
Explicitly ignore returned value from unlink() in ngx_open_tempfile().
authorAndrey Belov <defan@nginx.com>
Mon, 6 Aug 2012 16:06:59 +0000 (16:06 +0000)
committerAndrey Belov <defan@nginx.com>
Mon, 6 Aug 2012 16:06:59 +0000 (16:06 +0000)
The only thing we could potentially do here in case of error
returned is to complain to error log, but we don't have log
structure available here due to interface limitations.

Prodded by Coverity.

src/os/unix/ngx_files.c

index 2dfa1b7a1ab967a5f02c5f5ff572e8c03b99d7a4..d71aec316d49fd96f030f8f338d6553e4e359866 100644 (file)
@@ -139,7 +139,7 @@ ngx_open_tempfile(u_char *name, ngx_uint_t persistent, ngx_uint_t access)
               access ? access : 0600);
 
     if (fd != -1 && !persistent) {
-        unlink((const char *) name);
+        (void) unlink((const char *) name);
     }
 
     return fd;