From ac434c4223ba7a7cbbd97a59e305445a22a32c76 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 6 Dec 2012 16:02:57 +0100 Subject: [PATCH] util: Don't use the pid ret value uninitialized. Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- lib/util/pidfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/pidfile.c b/lib/util/pidfile.c index 88463711f94..1b382d12175 100644 --- a/lib/util/pidfile.c +++ b/lib/util/pidfile.c @@ -36,7 +36,7 @@ pid_t pidfile_pid(const char *piddir, const char *name) { int fd; char pidstr[20]; - pid_t ret; + pid_t ret = -1; char *pidFile; if (asprintf(&pidFile, "%s/%s.pid", piddir, name) < 0) {