From c1f1949ff134c343cb0ee8f8e46cf58b1dfe97c7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 16 Apr 2007 22:42:45 +0000 Subject: [PATCH] r22285: Allow arbitrary bases in int and ulong parsing. Jeremy. --- source/param/loadparm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index ea434e47689..c37fe54418e 100644 --- a/source/param/loadparm.c +++ b/source/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); } /******************************************************************* -- 2.47.3