[systemd-commits] src/journal
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Wed Mar 27 09:47:46 PDT 2013
src/journal/catalog.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 464264ac5a35b655065c5d95b8d8ffbbc7ff3bcf
Author: Lukas Nykryn <lnykryn at redhat.com>
Date: Wed Mar 27 17:35:55 2013 +0100
catalog: fix error codes handling in catalog_list_items
Previously r was set to zero and so if(r<0) was never true.
diff --git a/src/journal/catalog.c b/src/journal/catalog.c
index 6b195f6..7ae7b3e 100644
--- a/src/journal/catalog.c
+++ b/src/journal/catalog.c
@@ -617,7 +617,7 @@ int catalog_list_items(FILE *f, bool oneline, char **items) {
if (k < 0) {
log_error("Failed to parse id128 '%s': %s",
*item, strerror(-k));
- if (r < 0)
+ if (r == 0)
r = k;
continue;
}
@@ -627,7 +627,7 @@ int catalog_list_items(FILE *f, bool oneline, char **items) {
log_full(k == -ENOENT ? LOG_NOTICE : LOG_ERR,
"Failed to retrieve catalog entry for '%s': %s",
*item, strerror(-k));
- if (r < 0)
+ if (r == 0)
r = k;
continue;
}
More information about the systemd-commits
mailing list