From owner-svn-src-head@FreeBSD.ORG Fri Jul 12 02:36:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 152AB61D; Fri, 12 Jul 2013 02:36:01 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 06DEA12C0; Fri, 12 Jul 2013 02:36:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C2a0BI018968; Fri, 12 Jul 2013 02:36:00 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C2a0nQ018966; Fri, 12 Jul 2013 02:36:00 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201307120236.r6C2a0nQ018966@svn.freebsd.org> From: Hiroki Sato Date: Fri, 12 Jul 2013 02:36:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253247 - head/lib/libgeom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2013 02:36:01 -0000 Author: hrs Date: Fri Jul 12 02:36:00 2013 New Revision: 253247 URL: http://svnweb.freebsd.org/changeset/base/253247 Log: Use strtoumax() instead of strtoul() for id/ref attr in XML elements. This improves compatibility when running an ILP32 binary on LP64 kernel. Spotted by: gjb Modified: head/lib/libgeom/geom_xml2tree.c Modified: head/lib/libgeom/geom_xml2tree.c ============================================================================== --- head/lib/libgeom/geom_xml2tree.c Fri Jul 12 02:28:35 2013 (r253246) +++ head/lib/libgeom/geom_xml2tree.c Fri Jul 12 02:36:00 2013 (r253247) @@ -75,10 +75,10 @@ StartElement(void *userData, const char ref = NULL; for (i = 0; attr[i] != NULL; i += 2) { if (!strcmp(attr[i], "id")) { - id = (void *)strtoul(attr[i + 1], NULL, 0); + id = (void *)strtoumax(attr[i + 1], NULL, 0); mt->nident++; } else if (!strcmp(attr[i], "ref")) { - ref = (void *)strtoul(attr[i + 1], NULL, 0); + ref = (void *)strtoumax(attr[i + 1], NULL, 0); } else printf("%*.*s[%s = %s]\n", mt->level + 1, mt->level + 1, "",