From 97699eff3afc9c0dda865882415f81584b926727 Mon Sep 17 00:00:00 2001 From: Gonglei Date: Fri, 26 Sep 2014 16:14:31 +0800 Subject: os-posix: remove confused errno If we get inside the 'else if (status == 1)' conditional, then we know that read() succeeded, and therefore errno is unspecified. Printing strerror(errno) on a random value is not helpful. Cc: Eric Blake Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini Signed-off-by: Michael Tokarev --- os-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os-posix.c') diff --git a/os-posix.c b/os-posix.c index f0564ef9d9..e31a099a2b 100644 --- a/os-posix.c +++ b/os-posix.c @@ -226,7 +226,7 @@ void os_daemonize(void) exit(1); } else if (status == 1) { - fprintf(stderr, "Could not acquire pidfile: %s\n", strerror(errno)); + fprintf(stderr, "Could not acquire pidfile\n"); exit(1); } else { exit(0); -- cgit v1.2.1