mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Explicitly cast getpid() result to int.
This placates cppcheck.
This commit is contained in:
parent
955762645d
commit
24fa3798b2
@ -2581,7 +2581,7 @@ static void pidfile_create(void) {
|
|||||||
err(1, "ftruncate() failed");
|
err(1, "ftruncate() failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(pidstr, sizeof(pidstr), "%u", getpid());
|
snprintf(pidstr, sizeof(pidstr), "%d", (int)getpid());
|
||||||
if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) {
|
if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) {
|
||||||
error = errno;
|
error = errno;
|
||||||
pidfile_remove();
|
pidfile_remove();
|
||||||
|
Loading…
Reference in New Issue
Block a user