diff options
author | David Kalnischkies <david@kalnischkies.de> | 2019-07-08 15:48:59 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2019-07-08 15:51:17 +0200 |
commit | 2b734a7ec429825c7007c1093883229e069d36c7 (patch) | |
tree | b67360f3201634c82f5a9e7dd84f47b28fa63acb /apt-pkg/contrib/strutl.cc | |
parent | cbe90ee516d7f747f981e423f164f99eb767240b (diff) |
Apply various suggestions by cppcheck
Reported-By: cppcheck
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index e02067e13..860e3fe47 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -239,7 +239,8 @@ bool ParseQuoteWord(const char *&String,string &Res) { // Skip leading whitespace const char *C = String; - for (;*C != 0 && *C == ' '; C++); + for (; *C == ' '; C++) + ; if (*C == 0) return false; @@ -287,7 +288,8 @@ bool ParseQuoteWord(const char *&String,string &Res) Res = Buffer; // Skip ending white space - for (;*C != 0 && isspace(*C) != 0; C++); + for (; isspace(*C) != 0; C++) + ; String = C; return true; } @@ -300,7 +302,8 @@ bool ParseCWord(const char *&String,string &Res) { // Skip leading whitespace const char *C = String; - for (;*C != 0 && *C == ' '; C++); + for (; *C == ' '; C++) + ; if (*C == 0) return false; |