summaryrefslogtreecommitdiffstats
path: root/usr.sbin/moused/moused.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2008-03-07 00:01:24 +0000
committerjkim <jkim@FreeBSD.org>2008-03-07 00:01:24 +0000
commit6de20f8883ef98ddddd52292641151e20433c748 (patch)
tree61251047882c5c9367dfa43b92596ac57836661d /usr.sbin/moused/moused.c
parent6d5f005346f78f0ceca2a2355a7f20af1e6e78da (diff)
downloadFreeBSD-src-6de20f8883ef98ddddd52292641151e20433c748.zip
FreeBSD-src-6de20f8883ef98ddddd52292641151e20433c748.tar.gz
Use intmax_t instead of long when casting time_t.
Suggested by: mlaier Tested with: make universe
Diffstat (limited to 'usr.sbin/moused/moused.c')
-rw-r--r--usr.sbin/moused/moused.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c
index 0d57d46..2f6a2a9 100644
--- a/usr.sbin/moused/moused.c
+++ b/usr.sbin/moused/moused.c
@@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -2547,7 +2548,7 @@ r_timestamp(mousestatus_t *act)
ts2.tv_sec = rodent.clickthreshold / 1000;
ts2.tv_nsec = (rodent.clickthreshold % 1000) * 1000000;
tssub(&ts1, &ts2, &ts);
- debug("ts: %ld %ld", (long)ts.tv_sec, ts.tv_nsec);
+ debug("ts: %jd %ld", (intmax_t)ts.tv_sec, ts.tv_nsec);
/* 3 button emulation timeout */
ts2.tv_sec = rodent.button2timeout / 1000;
@@ -2559,8 +2560,8 @@ r_timestamp(mousestatus_t *act)
if (mask & 1) {
if (act->button & button) {
/* the button is down */
- debug(" : %ld %ld",
- (long)bstate[i].ts.tv_sec, bstate[i].ts.tv_nsec);
+ debug(" : %jd %ld",
+ (intmax_t)bstate[i].ts.tv_sec, bstate[i].ts.tv_nsec);
if (tscmp(&ts, &bstate[i].ts, >)) {
bstate[i].count = 1;
} else {
OpenPOWER on IntegriCloud