alsactl: daemon.c - fix gcc warning in write_pid_file()

This commit is contained in:
Jaroslav Kysela 2020-05-14 16:48:57 +02:00
parent 2cfeffb6e8
commit f9abf36d34

View file

@ -293,7 +293,7 @@ static long read_pid_file(const char *pidfile)
static int write_pid_file(const char *pidfile) static int write_pid_file(const char *pidfile)
{ {
int fd, err; int fd, err;
char pid_txt[12]; char pid_txt[14];
sprintf(pid_txt, "%10li\n", (long)getpid()); sprintf(pid_txt, "%10li\n", (long)getpid());
fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0600); fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0600);