svn commit: r228680 - head/usr.sbin/rpc.ypupdated

Dimitry Andric dim at FreeBSD.org
Sun Dec 18 00:55:46 UTC 2011


Author: dim
Date: Sun Dec 18 00:55:46 2011
New Revision: 228680
URL: http://svn.freebsd.org/changeset/base/228680

Log:
  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

Modified:
  head/usr.sbin/rpc.ypupdated/yp_dbupdate.c

Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c
==============================================================================
--- head/usr.sbin/rpc.ypupdated/yp_dbupdate.c	Sun Dec 18 00:44:59 2011	(r228679)
+++ head/usr.sbin/rpc.ypupdated/yp_dbupdate.c	Sun Dec 18 00:55:46 2011	(r228680)
@@ -131,7 +131,7 @@ ypmap_update(char *netname, char *map, u
 		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;


More information about the svn-src-head mailing list