aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-06-28 20:45:10 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-06-28 20:45:10 +0000
commitbbd0e398011570a6361e5c62dec5e52c83d843cb (patch)
tree8304cebd370def09ae126ba4b025e02afb71b4a8 /src
parentFix a clang warning. (diff)
downloadbreakpad-bbd0e398011570a6361e5c62dec5e52c83d843cb.tar.xz
Fix a clang warning:
../../breakpad/src/processor/tokenize.cc:65:7: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses] if (!remaining > 0) { ^ ~ ../../breakpad/src/processor/tokenize.cc:65:7: note: add parentheses after the '!' to evaluate the comparison first if (!remaining > 0) { ^ ( ) ../../breakpad/src/processor/tokenize.cc:65:7: note: add parentheses around left hand side expression to silence this warning if (!remaining > 0) { ^ ( ) R=thakis@chromium.org Review URL: https://breakpad.appspot.com/608002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1196 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/processor/tokenize.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/processor/tokenize.cc b/src/processor/tokenize.cc
index a5b028e3..f468120c 100644
--- a/src/processor/tokenize.cc
+++ b/src/processor/tokenize.cc
@@ -62,10 +62,8 @@ bool Tokenize(char *line,
}
// If there's anything left, just add it as a single token.
- if (!remaining > 0) {
- if ((token = strtok_r(NULL, "\r\n", &save_ptr))) {
- tokens->push_back(token);
- }
+ if (remaining == 0 && (token = strtok_r(NULL, "\r\n", &save_ptr))) {
+ tokens->push_back(token);
}
return tokens->size() == static_cast<unsigned int>(max_tokens);