chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
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 dacf5c50a197cb608e07877f63421e222706846c..6b195f6920a16de5418cfdbfe883c6d7ea455fc2 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;