diff options
-rw-r--r-- | runtime/POSIX/klee_init_env.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/POSIX/klee_init_env.c b/runtime/POSIX/klee_init_env.c index f691c743..f45ddf3c 100644 --- a/runtime/POSIX/klee_init_env.c +++ b/runtime/POSIX/klee_init_env.c @@ -26,18 +26,17 @@ static void __emit_error(const char *msg) { /* Helper function that converts a string to an integer, and terminates the program with an error message is the string is not a - proper number */ + proper number */ static long int __str_to_int(char *s, const char *error_msg) { long int res = 0; char c; - if (!*s) __emit_error(error_msg); + if (!*s) + __emit_error(error_msg); while ((c = *s++)) { - if (c == '\0') { - break; - } else if (c>='0' && c<='9') { - res = res*10 + (c - '0'); + if (c >= '0' && c <= '9') { + res = res * 10 + (c - '0'); } else { __emit_error(error_msg); } |