[tarantool-patches] Re: [PATCH 1/6] sql: refactor sql_atoi64()
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Jul 2 00:53:00 MSK 2019
Hi! Thanks for the fixes!
Consider new ones below, and on the branch
in a separate commit.
=====================================================
diff --git a/src/box/sql/expr.c b/src/box/sql/expr.c
index 0df050e7a..bf347b401 100644
--- a/src/box/sql/expr.c
+++ b/src/box/sql/expr.c
@@ -3292,11 +3292,10 @@ expr_code_int(struct Parse *parse, struct Expr *expr, bool is_neg,
const char *sign = is_neg ? "-" : "";
if (z[0] == '0' && (z[1] == 'x' || z[1] == 'X')) {
errno = 0;
- char *end = NULL;
if (is_neg) {
- value = strtoll(z, &end, 16);
+ value = strtoll(z, NULL, 16);
} else {
- value = strtoull(z, &end, 16);
+ value = strtoull(z, NULL, 16);
if (value > INT64_MAX)
goto int_overflow;
}
More information about the Tarantool-patches
mailing list