dovecot-1.1: maildirlock: Don't use %m format with fprintf(), it...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Oct 18 22:51:32 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/51843e7f1314
changeset: 7952:51843e7f1314
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 90a1d5c1e16e -r 51843e7f1314 src/util/maildirlock.c
--- a/src/util/maildirlock.c Sat Oct 18 21:21:18 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