]> granicus.if.org Git - pdns/commit
dnsbulktest: Explicitely check that find() returned 0
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 29 May 2019 09:35:35 +0000 (11:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 29 May 2019 09:35:35 +0000 (11:35 +0200)
commit1ee9e847c7ff20f1929d9468dfe9762f06ef5d14
treebd4f117a5c5d0f84f8d40691a251c35452d5a319
parentb7a969f25d4f9ec3a262f99387ac71e38d68ff03
dnsbulktest: Explicitely check that find() returned 0

std::string::find() will return 0 if the line starts with '.', but
it was not obvious from the existing code whether we tested for 0
or a string::npos since we treated the return value as a boolean.
Reported by Coverity (CID 1401631).
pdns/dnsbulktest.cc