diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-10-09 12:57:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-10-22 09:32:13 -0400 |
commit | d1cdb1a24e6289d5ce6f2c1433395abae7185e6e (patch) | |
tree | f496aaa97010204f0f8c6953fd360baa4d9a48b1 /src/lib/string | |
parent | 41f44d87604c8b780e9c3a1e60f006633e0a6d1b (diff) | |
download | tor-d1cdb1a24e6289d5ce6f2c1433395abae7185e6e.tar.gz tor-d1cdb1a24e6289d5ce6f2c1433395abae7185e6e.zip |
Use STMT_BEGIN/END in parse_int.c so coccinelle can handle it.
Diffstat (limited to 'src/lib/string')
-rw-r--r-- | src/lib/string/parse_int.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/string/parse_int.c b/src/lib/string/parse_int.c index fbdd554a47..fd4422ecd0 100644 --- a/src/lib/string/parse_int.c +++ b/src/lib/string/parse_int.c @@ -9,6 +9,7 @@ **/ #include "lib/string/parse_int.h" +#include "lib/cc/compat_compiler.h" #include <errno.h> #include <stdlib.h> @@ -17,6 +18,7 @@ /* Helper: common code to check whether the result of a strtol or strtoul or * strtoll is correct. */ #define CHECK_STRTOX_RESULT() \ + STMT_BEGIN \ /* Did an overflow occur? */ \ if (errno == ERANGE) \ goto err; \ @@ -38,7 +40,8 @@ err: \ if (ok) *ok = 0; \ if (next) *next = endptr; \ - return 0 + return 0; \ + STMT_END /** Extract a long from the start of <b>s</b>, in the given numeric * <b>base</b>. If <b>base</b> is 0, <b>s</b> is parsed as a decimal, |