From: David Disseldorp Date: Wed, 22 Sep 2021 20:40:17 +0000 (+0200) Subject: refactor(install): use check_hashmap helper consistently X-Git-Tag: 056~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96f3177c3312fdc893cee2f4ccdd1bdfbb5dfc0e;p=thirdparty%2Fdracut.git refactor(install): use check_hashmap helper consistently Signed-off-by: David Disseldorp --- diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c index 401c09d70..4ec65a5a5 100644 --- a/src/install/dracut-install.c +++ b/src/install/dracut-install.c @@ -1187,7 +1187,6 @@ static int resolve_lazy(int argc, char **argv) for (i = 0; i < argc; i++) { const char *src = argv[i]; char *p = argv[i]; - char *existing; log_debug("resolve_deps('%s')", src); @@ -1195,10 +1194,8 @@ static int resolve_lazy(int argc, char **argv) p = &argv[i][destrootdirlen]; } - existing = hashmap_get(items, p); - if (existing) { - if (strcmp(existing, p) == 0) - continue; + if (check_hashmap(items, p)) { + continue; } item = strdup(p);