summaryrefslogtreecommitdiffstats
path: root/edify/expr.cpp
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2016-04-19 00:34:41 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-04-19 00:34:41 +0200
commit0231e7016dfe56625d6d01a1de468cd23d9cf01a (patch)
tree543fc407741ac3df540e3bfe4c36688e3bda6d80 /edify/expr.cpp
parentMerge "Fix IWYU errors." am: 51dcd0d (diff)
parentMerge "Fix google-runtime-int warnings." (diff)
downloadandroid_bootable_recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.tar
android_bootable_recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.tar.gz
android_bootable_recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.tar.bz2
android_bootable_recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.tar.lz
android_bootable_recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.tar.xz
android_bootable_recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.tar.zst
android_bootable_recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.zip
Diffstat (limited to 'edify/expr.cpp')
-rw-r--r--edify/expr.cpp7
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;
}