(create_pidfile): Silence compiler warning on printing pid_t with %d.

This commit is contained in:
Markus Armbruster 2005-06-25 16:41:34 +00:00
parent 060df4ec8f
commit f519de81d6

View file

@ -349,7 +349,7 @@ create_pidfile(char *fname, pid_t pid)
{ {
FILE *pidf = fopen(fname, "w"); FILE *pidf = fopen(fname, "w");
if (!pidf if (!pidf
|| fprintf(pidf, "%d\n", pid) < 0 || fprintf(pidf, "%d\n", (int)pid) < 0
|| fclose(pidf)) { || fclose(pidf)) {
logerror("Can't write PID file (%s)", strerror(errno)); logerror("Can't write PID file (%s)", strerror(errno));
exit(1); exit(1);