projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
531991b
)
log: fix error codes handling in catalog_list_items
author
Lukas Nykryn
<lnykryn@redhat.com>
Wed, 27 Mar 2013 09:44:21 +0000
(10:44 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 27 Mar 2013 16:01:44 +0000
(12:01 -0400)
It does not make sense to print error code from previous loop.
src/journal/catalog.c
patch
|
blob
|
history
diff --git
a/src/journal/catalog.c
b/src/journal/catalog.c
index
dacf5c5
..
6b195f6
100644
(file)
--- 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;