diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-03-27 17:35:55 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-27 12:46:36 -0400 |
commit | 464264ac5a35b655065c5d95b8d8ffbbc7ff3bcf (patch) | |
tree | 79a0f6571a3a6a874f72bb7dcbe718b3f0efd39e /src/journal | |
parent | 2e8fb7026d3c560194cfe9f83935ce0b16263da0 (diff) |
catalog: fix error codes handling in catalog_list_items
Previously r was set to zero and so if(r<0) was never true.
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/catalog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/catalog.c b/src/journal/catalog.c index 6b195f6920..7ae7b3eecf 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; } |