diff options
author | Chih-Hung Hsieh <chh@google.com> | 2016-04-19 00:29:19 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-19 00:29:19 +0200 |
commit | bcad1d1ced730478c94f951034d252e777661332 (patch) | |
tree | ad6f90bea569c5f01bbf9485e356dcdb035d79c5 /edify | |
parent | Merge "Fix IWYU errors." (diff) | |
parent | Merge "Fix google-runtime-int warnings." (diff) | |
download | android_bootable_recovery-bcad1d1ced730478c94f951034d252e777661332.tar android_bootable_recovery-bcad1d1ced730478c94f951034d252e777661332.tar.gz android_bootable_recovery-bcad1d1ced730478c94f951034d252e777661332.tar.bz2 android_bootable_recovery-bcad1d1ced730478c94f951034d252e777661332.tar.lz android_bootable_recovery-bcad1d1ced730478c94f951034d252e777661332.tar.xz android_bootable_recovery-bcad1d1ced730478c94f951034d252e777661332.tar.zst android_bootable_recovery-bcad1d1ced730478c94f951034d252e777661332.zip |
Diffstat (limited to 'edify')
-rw-r--r-- | edify/expr.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/edify/expr.cpp b/edify/expr.cpp index cd1e08726..c34342f76 100644 --- a/edify/expr.cpp +++ b/edify/expr.cpp @@ -286,13 +286,14 @@ Value* LessThanIntFn(const char* name, State* state, int argc, Expr* argv[]) { bool result = false; char* end; - long l_int = strtol(left, &end, 10); + // Parse up to at least long long or 64-bit integers. + int64_t l_int = static_cast<int64_t>(strtoll(left, &end, 10)); if (left[0] == '\0' || *end != '\0') { goto done; } - long r_int; - r_int = strtol(right, &end, 10); + int64_t r_int; + r_int = static_cast<int64_t>(strtoll(right, &end, 10)); if (right[0] == '\0' || *end != '\0') { goto done; } |