mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
lib:util: Initialize pid
Found by covscan Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
31b9208d83
commit
4e9a58f376
@ -207,7 +207,7 @@ void pidfile_create(const char *piddir, const char *name)
|
||||
{
|
||||
size_t len = strlen(piddir) + strlen(name) + 6;
|
||||
char pidFile[len];
|
||||
pid_t pid;
|
||||
pid_t pid = (pid_t)-1;
|
||||
int ret, fd;
|
||||
|
||||
snprintf(pidFile, sizeof(pidFile), "%s/%s.pid", piddir, name);
|
||||
|
Loading…
Reference in New Issue
Block a user