]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
More function flatening
authorDale Weiler <killfieldengine@gmail.com>
Sun, 14 Apr 2013 01:16:35 +0000 (01:16 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 14 Apr 2013 01:16:35 +0000 (01:16 +0000)
main.c
opts.c

diff --git a/main.c b/main.c
index e801aaff7ea7d840a658e504273c4b0b99ed2f81..0c2020c2f4fbb0ed0ed3b76828c3efcfae6d0594 100644 (file)
--- 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 4b765683099c56e58cfc5979189c61e0ec9db25b..5a6cb40001521f980030f66025f17745fac0770d 100644 (file)
--- 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) {