From 6ff02eac416212300b2afe74d3757805b830ece9 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 28 Mar 2023 15:20:12 +0200 Subject: [PATCH] systemctl-list-unit-files: drop workaround for Coverity This partially reverts commit 0da999fada225d2d74b62ec758cd437a3e2f6ebb . --- src/systemctl/systemctl-list-unit-files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemctl/systemctl-list-unit-files.c b/src/systemctl/systemctl-list-unit-files.c index a2b12436b3d..69f0d977c1b 100644 --- a/src/systemctl/systemctl-list-unit-files.c +++ b/src/systemctl/systemctl-list-unit-files.c @@ -157,7 +157,7 @@ int verb_list_unit_files(int argc, char *argv[], void *userdata) { n_units = hashmap_size(h); - units = new(UnitFileList, n_units ?: 1); /* avoid malloc(0) */ + units = new(UnitFileList, n_units); if (!units) return log_oom();