From: Dale Weiler Date: Sun, 14 Apr 2013 01:16:35 +0000 (+0000) Subject: More function flatening X-Git-Tag: before-library~69 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a25bd052d73f59e1772f1eee2e8b11f1dedbc254;p=xonotic%2Fgmqcc.git More function flatening --- 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) {