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

Dimitry Andric dim at FreeBSD.org
Sun Dec 18 00:40:31 UTC 2011


Author: dim
Date: Sun Dec 18 00:40:30 2011
New Revision: 228678
URL: http://svn.freebsd.org/changeset/base/228678

Log:
  In usr.sbin/rpc.ypupdated/yp_dbupdate.c, use the appropriate printf
  length modifier for time_t (after casting it to intmax_t).
  
  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:34:42 2011	(r228677)
+++ head/usr.sbin/rpc.ypupdated/yp_dbupdate.c	Sun Dec 18 00:40:30 2011	(r228678)
@@ -130,7 +130,7 @@ ypmap_update(char *netname, char *map, u
 		return(rval);
 	}
 
-	snprintf(yplastbuf, sizeof(yplastbuf), "%lu", time(NULL));
+	snprintf(yplastbuf, sizeof(yplastbuf), "%ju", (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