diff options
| -rw-r--r-- | usr.bin/usbhidaction/usbhidaction.c | 3 | ||||
| -rw-r--r-- | usr.sbin/apmd/apmd.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/usbhidaction/usbhidaction.c b/usr.bin/usbhidaction/usbhidaction.c index fc78d4e31cb6..142e3cc8a3a8 100644 --- a/usr.bin/usbhidaction/usbhidaction.c +++ b/usr.bin/usbhidaction/usbhidaction.c @@ -165,7 +165,8 @@ main(int argc, char **argv) if (demon) { fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH); if (fp >= 0) { - sz1 = snprintf(buf, sizeof buf, "%d\n", getpid()); + sz1 = snprintf(buf, sizeof buf, "%ld\n", + (long)getpid()); if (sz1 > sizeof buf) sz1 = sizeof buf; write(fp, buf, sz1); diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c index f6654d58f124..585383c7221e 100644 --- a/usr.sbin/apmd/apmd.c +++ b/usr.sbin/apmd/apmd.c @@ -435,7 +435,7 @@ write_pid(void) FILE *fp = fopen(apmd_pidfile, "w"); if (fp) { - fprintf(fp, "%d\n", getpid()); + fprintf(fp, "%ld\n", (long)getpid()); fclose(fp); } } |
