diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-07-31 14:33:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-31 14:33:45 +0200 |
commit | 4feb10fdaf51bf3f88b853cdb32a1e9b1692ba52 (patch) | |
tree | a99925c17b8acddd802c705221ee71b71f891694 /libqpdf/InputSource.cc | |
parent | c9cc8cfd74fdb59d5450939e1772dea35d369b04 (diff) | |
parent | 073808aa50f0c78e2d6fea4f56f0b814b314eb42 (diff) | |
download | qpdf-4feb10fdaf51bf3f88b853cdb32a1e9b1692ba52.tar.zst |
Merge pull request #734 from m-holger/nullptr
Code tidy : replace 0 with nullptr or true
Diffstat (limited to 'libqpdf/InputSource.cc')
-rw-r--r-- | libqpdf/InputSource.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libqpdf/InputSource.cc b/libqpdf/InputSource.cc index ba4c3cbc..33ab44d1 100644 --- a/libqpdf/InputSource.cc +++ b/libqpdf/InputSource.cc @@ -69,7 +69,7 @@ InputSource::findFirst( " too small or too large of a character sequence"); } - char* p = 0; + char* p = nullptr; qpdf_offset_t buf_offset = offset; size_t bytes_read = 0; @@ -86,7 +86,8 @@ InputSource::findFirst( // If p points to buf[size], since strlen(start_chars) is // always >= 1, this overflow test will be correct for that // case regardless of start_chars. - if ((p == 0) || ((p + strlen(start_chars)) > (buf + bytes_read))) { + if ((p == nullptr) || + ((p + strlen(start_chars)) > (buf + bytes_read))) { if (p) { QTC::TC( "libtests", @@ -117,7 +118,7 @@ InputSource::findFirst( memchr( p, start_chars[0], - bytes_read - QIntC::to_size(p - buf)))) != 0) { + bytes_read - QIntC::to_size(p - buf)))) != nullptr) { if (p == buf) { QTC::TC("libtests", "InputSource found match at buf[0]"); } |