From: Lennart Poettering Date: Tue, 26 Dec 2017 15:01:14 +0000 (+0100) Subject: analyze: add some logging to some error cases X-Git-Tag: v237~169^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8efbce138ab5d43ee002bba2064118a72daaf9f4;p=thirdparty%2Fsystemd.git analyze: add some logging to some error cases --- diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 16eba2d90f9..ec2504a1c03 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -1007,12 +1007,12 @@ static int analyze_critical_chain(int argc, char *argv[], void *userdata) { h = hashmap_new(&string_hash_ops); if (!h) - return -ENOMEM; + return log_oom(); - for (i = 0; i < (unsigned)n; i++) { + for (i = 0; i < (unsigned) n; i++) { r = hashmap_put(h, times[i].name, ×[i]); if (r < 0) - return r; + return log_error_errno(r, "Failed to add entry to hashmap: %m"); } unit_times_hashmap = h;