From owner-svn-src-stable-9@FreeBSD.ORG Sun Jan 1 23:39:56 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D98EB1065670; Sun, 1 Jan 2012 23:39:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3ADC8FC14; Sun, 1 Jan 2012 23:39:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q01NduMj037410; Sun, 1 Jan 2012 23:39:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q01NduaQ037408; Sun, 1 Jan 2012 23:39:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201201012339.q01NduaQ037408@svn.freebsd.org> From: Dimitry Andric Date: Sun, 1 Jan 2012 23:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229241 - stable/9/usr.sbin/rpc.ypupdated X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2012 23:39:57 -0000 Author: dim Date: Sun Jan 1 23:39:56 2012 New Revision: 229241 URL: http://svn.freebsd.org/changeset/base/229241 Log: MFC r228678: In usr.sbin/rpc.ypupdated/yp_dbupdate.c, use the appropriate printf length modifier for time_t (after casting it to intmax_t). MFC r228679: In usr.sbin/rpc.ypupdated/yp_dbupdate.c, include stdint.h, so intmax_t is known, otherwise it won't build. Pointy hat to: dim MFC r228680: 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... Modified: stable/9/usr.sbin/rpc.ypupdated/yp_dbupdate.c Directory Properties: stable/9/usr.sbin/rpc.ypupdated/ (props changed) Modified: stable/9/usr.sbin/rpc.ypupdated/yp_dbupdate.c ============================================================================== --- stable/9/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Jan 1 23:36:13 2012 (r229240) +++ stable/9/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Jan 1 23:39:56 2012 (r229241) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -130,7 +131,7 @@ ypmap_update(char *netname, char *map, u return(rval); } - snprintf(yplastbuf, sizeof(yplastbuf), "%lu", time(NULL)); + snprintf(yplastbuf, sizeof(yplastbuf), "%jd", (intmax_t)time(NULL)); key.data = yp_last; key.size = strlen(yp_last); data.data = (char *)&yplastbuf;