dovecot-1.2: maildirlock: Don't use %m format with fprintf(), it...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 18 22:51:38 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/698fca0d8b0a
changeset: 8296:698fca0d8b0a
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 18 22:51:20 2008 +0300
description:
maildirlock: Don't use %m format with fprintf(), it's not portable.

diffstat:

1 file changed, 3 insertions(+), 3 deletions(-)
src/util/maildirlock.c |    6 +++---

diffs (28 lines):

diff -r f40ebb033a1b -r 698fca0d8b0a src/util/maildirlock.c
--- 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 @@ int main(int argc, const char *argv[])
 	}
 	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 @@ int main(int argc, const char *argv[])
 		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) {


More information about the dovecot-cvs mailing list