From: Lukas Nykryn Date: Wed, 27 Mar 2013 09:44:21 +0000 (+0100) Subject: log: fix error codes handling in catalog_list_items X-Git-Tag: upstream/200~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e8fb7026d3c560194cfe9f83935ce0b16263da0;p=platform%2Fupstream%2Fsystemd.git log: fix error codes handling in catalog_list_items It does not make sense to print error code from previous loop. --- diff --git a/src/journal/catalog.c b/src/journal/catalog.c index dacf5c5..6b195f6 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c @@ -616,7 +616,7 @@ int catalog_list_items(FILE *f, bool oneline, char **items) { k = sd_id128_from_string(*item, &id); if (k < 0) { log_error("Failed to parse id128 '%s': %s", - *item, strerror(-r)); + *item, strerror(-k)); if (r < 0) r = k; continue; @@ -626,7 +626,7 @@ int catalog_list_items(FILE *f, bool oneline, char **items) { if (k < 0) { log_full(k == -ENOENT ? LOG_NOTICE : LOG_ERR, "Failed to retrieve catalog entry for '%s': %s", - *item, strerror(-r)); + *item, strerror(-k)); if (r < 0) r = k; continue;