summaryrefslogtreecommitdiff
path: root/apt-private/private-show.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2019-07-08 15:48:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2019-07-08 15:51:17 +0200
commit2b734a7ec429825c7007c1093883229e069d36c7 (patch)
treeb67360f3201634c82f5a9e7dd84f47b28fa63acb /apt-private/private-show.cc
parentcbe90ee516d7f747f981e423f164f99eb767240b (diff)
Apply various suggestions by cppcheck
Reported-By: cppcheck
Diffstat (limited to 'apt-private/private-show.cc')
-rw-r--r--apt-private/private-show.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc
index b69008ec9..9ebbe6ac0 100644
--- a/apt-private/private-show.cc
+++ b/apt-private/private-show.cc
@@ -89,7 +89,7 @@ static APT_PURE char const *skipColonSpaces(char const *Buffer, size_t const Len
++Buffer;
for (; isspace(*Buffer) != 0 && Length - (Buffer - Start) > 0; ++Buffer)
;
- if (Length - (Buffer - Start) <= 0)
+ if (Length < static_cast<size_t>(Buffer - Start))
return nullptr;
return Buffer;
}