]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/messages.c
Merge master
[netatalk.git] / etc / afpd / messages.c
index 2812886229b7d5e96688012bf55a117f62d81c8f..e48585e353b1d2ab4dff76cc3ebb46812853a8ca 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: messages.c,v 1.23 2009-11-24 15:44:40 didg Exp $
- *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
  */
@@ -9,9 +7,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif /* HAVE_UNISTD_H */
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
@@ -20,7 +16,8 @@
 #include <atalk/dsi.h>
 #include <atalk/util.h>
 #include <atalk/logger.h>
-#include "globals.h"
+#include <atalk/globals.h>
+
 #include "misc.h"
 
 
@@ -89,7 +86,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 */