gbranden pushed a commit to branch master
in repository groff.

commit e5b083c248f79ab73ed8ab565da5dcf59720c471
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Nov 26 03:06:46 2021 +1100

    [libbib]: Trivially refactor.
    
    Compare a pointer explicitly to a null pointer literal instead of
    treating it like a Boolean.
---
 src/libs/libbib/index.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libs/libbib/index.cpp b/src/libs/libbib/index.cpp
index 3d14188..5b716ee 100644
--- a/src/libs/libbib/index.cpp
+++ b/src/libs/libbib/index.cpp
@@ -245,7 +245,7 @@ bool index_search_item::load(int fd)
     return false;
   }
   const char *problem = check_header(size);
-  if (problem) {
+  if (problem != 0) {
     if (do_verify)
       error("corrupt header in index file '%1': %2", name, problem);
     else

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to