summaryrefslogtreecommitdiff
path: root/usr.bin/usbhidaction
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2010-08-31 07:19:10 +0000
committerKevin Lo <kevlo@FreeBSD.org>2010-08-31 07:19:10 +0000
commit34759932a8c5b0de7a43f59aeb02de70ecb8aeea (patch)
tree7797c8a9b64d3d6134c74efd195007ed32b81254 /usr.bin/usbhidaction
parent83b718eb07be2da422633a97298fb549aed1d711 (diff)
downloadsrc-test-34759932a8c5b0de7a43f59aeb02de70ecb8aeea.tar.gz
src-test-34759932a8c5b0de7a43f59aeb02de70ecb8aeea.zip
For consistency, cast result of getpid() to long
Notes
Notes: svn path=/head/; revision=212048
Diffstat (limited to 'usr.bin/usbhidaction')
-rw-r--r--usr.bin/usbhidaction/usbhidaction.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/usbhidaction/usbhidaction.c b/usr.bin/usbhidaction/usbhidaction.c
index fc78d4e31cb6c..142e3cc8a3a8e 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);