commit:     bf39c0fefdd990da681cd31376e556006e62cb10
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 16 19:03:08 2021 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jun 16 19:19:43 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=bf39c0fe

qmerge: add comment about hash == NULL

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 qmerge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qmerge.c b/qmerge.c
index 7b42956..0e7ada4 100644
--- a/qmerge.c
+++ b/qmerge.c
@@ -1514,7 +1514,7 @@ pkg_unmerge(tree_pkg_ctx *pkg_ctx, set *keep,
                                        char *hash = hash_file_at(portroot_fd,
                                                        e->name + 1, HASH_MD5);
                                        protected = 0;
-                                       if (hash)
+                                       if (hash != NULL)  /* if file was not 
removed */
                                                protected = strcmp(e->digest, 
(const char *)hash);
                                }
                                break;

Reply via email to