1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

util: Don't use the pid ret value uninitialized.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Andreas Schneider 2012-12-06 16:02:57 +01:00 committed by Günther Deschner
parent f1fe877d07
commit ac434c4223

View File

@ -36,7 +36,7 @@ pid_t pidfile_pid(const char *piddir, const char *name)
{ {
int fd; int fd;
char pidstr[20]; char pidstr[20];
pid_t ret; pid_t ret = -1;
char *pidFile; char *pidFile;
if (asprintf(&pidFile, "%s/%s.pid", piddir, name) < 0) { if (asprintf(&pidFile, "%s/%s.pid", piddir, name) < 0) {