From e459831b5a672683dcf63cac6ebb4b76e62e6549 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 16 Apr 2007 22:42:45 +0000 Subject: r22285: Allow arbitrary bases in int and ulong parsing. Jeremy. (This used to be commit c1f1949ff134c343cb0ee8f8e46cf58b1dfe97c7) --- source3/param/loadparm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index ea434e4768..c37fe54418 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2232,7 +2232,7 @@ static int lp_int(const char *s) return (-1); } - return atoi(s); + return (int)strtol(s, NULL, 0); } /******************************************************************* @@ -2246,7 +2246,7 @@ static unsigned long lp_ulong(const char *s) return (0); } - return strtoul(s, NULL, 10); + return strtoul(s, NULL, 0); } /******************************************************************* -- cgit