]> arthur.barton.de Git - netatalk.git/commitdiff
Comparison in error check was wrong
authorFrank Lahm <franklahm@googlemail.com>
Wed, 15 Sep 2010 08:24:26 +0000 (10:24 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 15 Sep 2010 08:24:26 +0000 (10:24 +0200)
etc/afpd/messages.c

index 2812886229b7d5e96688012bf55a117f62d81c8f..13e03f4066cb7fc6cca11fb0ae588846a6fde615 100644 (file)
@@ -89,7 +89,7 @@ void readmessage(AFPObj *obj)
                                strerror(errno));
         }
 
-        if ( 0 < (rc = unlink(filename)) )
+        if ((rc = unlink(filename)) != 0)
            LOG(log_error, logtype_afpd, "File '%s' could not be deleted", strerror(errno));
 
         /* Drop privs again, failing this is very bad */