changeset 8296:698fca0d8b0a HEAD

maildirlock: Don't use %m format with fprintf(), it's not portable.
author Timo Sirainen <tss@iki.fi>
date Sat, 18 Oct 2008 22:51:20 +0300
parents f40ebb033a1b
children 0d1bd98a6387
files src/util/maildirlock.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/util/maildirlock.c	Sat Oct 18 21:36:54 2008 +0300
+++ b/src/util/maildirlock.c	Sat Oct 18 22:51:20 2008 +0300
@@ -55,13 +55,13 @@
 	}
 	parent_pid = getpid();
 	if (pipe(fd) != 0) {
-		fprintf(stderr, "pipe() failed: %m");
+		fprintf(stderr, "pipe() failed: %s", strerror(errno));
 		return 1;
 	}
 
 	pid = fork();
 	if (pid == (pid_t)-1) {
-		fprintf(stderr, "fork() failed: %m");
+		fprintf(stderr, "fork() failed: %s", strerror(errno));
 		return 1;
 	}
 
@@ -76,7 +76,7 @@
 		close(fd[1]);
 		ret = read(fd[0], &c, 1);
 		if (ret < 0) {
-			fprintf(stderr, "read(pipe) failed: %m");
+			i_error("read(pipe) failed: %m");
 			return 1;
 		}
 		if (ret != 1) {