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, "", _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"