diff src/lib/net.c @ 19136:fefaa6d09a81

Replaced unlink() calls with i_unlink*() wherever possible.
author Timo Sirainen <tss@iki.fi>
date Tue, 08 Sep 2015 19:07:02 +0300
parents c53ccafc4a8e
children 9e120590e0ef
line wrap: on
line diff
--- a/src/lib/net.c	Tue Sep 08 18:49:00 2015 +0300
+++ b/src/lib/net.c	Tue Sep 08 19:07:02 2015 +0300
@@ -542,8 +542,7 @@
 		}
 
 		/* delete and try again */
-		if (unlink(path) < 0 && errno != ENOENT) {
-			i_error("unlink(%s) failed: %m", path);
+		if (i_unlink_if_exists(path) < 0) {
 			errno = EADDRINUSE;
 			return -1;
 		}