summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.ypupdated
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-18 00:55:46 +0000
committerdim <dim@FreeBSD.org>2011-12-18 00:55:46 +0000
commit4b1ea42179e50e076dcd83d50e30569c56bc8b03 (patch)
treebf1e4c7c8d0525c62f98ffcccb0c937a38c8cdca /usr.sbin/rpc.ypupdated
parentb4db5ea75844aa61c0e8cb81caa76e05c1a04395 (diff)
downloadFreeBSD-src-4b1ea42179e50e076dcd83d50e30569c56bc8b03.zip
FreeBSD-src-4b1ea42179e50e076dcd83d50e30569c56bc8b03.tar.gz
In usr.sbin/rpc.ypupdated/yp_dbupdate.c, since intmax_t is signed, just
like time_t, better use %jd instead of %ju. Strangely enough, neither gcc, clang nor gcc 4.6 warn about this discrepancy... MFC after: 1 week
Diffstat (limited to 'usr.sbin/rpc.ypupdated')
-rw-r--r--usr.sbin/rpc.ypupdated/yp_dbupdate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/rpc.ypupdated/yp_dbupdate.c b/usr.sbin/rpc.ypupdated/yp_dbupdate.c
index 2d0111d..3481a6b 100644
--- a/usr.sbin/rpc.ypupdated/yp_dbupdate.c
+++ b/usr.sbin/rpc.ypupdated/yp_dbupdate.c
@@ -131,7 +131,7 @@ ypmap_update(char *netname, char *map, unsigned int op, unsigned int keylen,
return(rval);
}
- snprintf(yplastbuf, sizeof(yplastbuf), "%ju", (intmax_t)time(NULL));
+ snprintf(yplastbuf, sizeof(yplastbuf), "%jd", (intmax_t)time(NULL));
key.data = yp_last;
key.size = strlen(yp_last);
data.data = (char *)&yplastbuf;
OpenPOWER on IntegriCloud