From a25bd052d73f59e1772f1eee2e8b11f1dedbc254 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sun, 14 Apr 2013 01:16:35 +0000 Subject: [PATCH 1/1] More function flatening --- main.c | 2 +- opts.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index e801aaf..0c2020c 100644 --- a/main.c +++ b/main.c @@ -403,7 +403,7 @@ static bool options_parse(int argc, char **argv) { return false; } if (isdigit(argarg[0])) { - uint32_t val = atoi(argarg); + uint32_t val = (uint32_t)strtol(argarg, NULL, 10); OPTS_OPTION_U32(OPTION_O) = val; opts_setoptimlevel(val); } else { diff --git a/opts.c b/opts.c index 4b76568..5a6cb40 100644 --- a/opts.c +++ b/opts.c @@ -257,7 +257,7 @@ static size_t opts_ini_parse ( static bool opts_ini_bool(const char *value) { if (!strcmp(value, "true")) return true; if (!strcmp(value, "false")) return false; - return !!atoi(value); + return !!strtoul(value, NULL, 10); } static char *opts_ini_load(const char *section, const char *name, const char *value) { -- 2.39.2