Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Dec 2011 00:55:46 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228680 - head/usr.sbin/rpc.ypupdated
Message-ID:  <201112180055.pBI0tkCD084778@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112180055.pBI0tkCD084778>