summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-10-14 15:20:26 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-10-14 15:20:26 +0200
commit076b509a6d91e82aaf7b63c56c5c960975cb0c85 (patch)
treeae1c6b5bf43c83778a9c84bd4f9fa9623366a6b4
parent46cbb7ff006d8b2b2c8eec39c5b7d862a8250cf1 (diff)
downloadjournal-notify-076b509a6d91e82aaf7b63c56c5c960975cb0c85.tar.gz
journal-notify-076b509a6d91e82aaf7b63c56c5c960975cb0c85.tar.zst
fix cleanup
-rw-r--r--journal-notify.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/journal-notify.c b/journal-notify.c
index 39dcd1c..ad60e1a 100644
--- a/journal-notify.c
+++ b/journal-notify.c
@@ -100,13 +100,13 @@ int main(int argc, char **argv) {
/* seek to the end of the journal */
if ((rc = sd_journal_seek_tail(journal)) < 0) {
fprintf(stderr, "Failed to seek to the tail: %s\n", strerror(-rc));
- goto out30;
+ goto out20;
}
/* we are behind the last entry, so use previous one */
if ((rc = sd_journal_previous(journal)) < 0) {
fprintf(stderr, "Failed to iterate to previous entry: %s\n", strerror(-rc));
- goto out30;
+ goto out20;
}
/* reinitialize getopt() by resetting optind to 0 */
@@ -121,7 +121,7 @@ int main(int argc, char **argv) {
if ((rc = sd_journal_add_conjunction(journal)) < 0) {
fprintf(stderr, "Failed to add logical AND to match.\n");
- goto out20;
+ goto out30;
}
break;
@@ -134,7 +134,7 @@ int main(int argc, char **argv) {
if ((rc = sd_journal_add_match(journal, optarg, 0)) < 0) {
fprintf(stderr, "Failed to add match '%s': %s\n", optarg, strerror(-rc));
- goto out20;
+ goto out30;
}
break;
@@ -144,7 +144,7 @@ int main(int argc, char **argv) {
if ((rc = sd_journal_add_disjunction(journal)) < 0) {
fprintf(stderr, "Failed to add logical OR to match.\n");
- goto out20;
+ goto out30;
}
break;
@@ -155,7 +155,7 @@ int main(int argc, char **argv) {
if (have_regex > 0) {
fprintf(stderr, "Only one regex allowed!\n");
rc = EXIT_FAILURE;
- goto out20;
+ goto out30;
}
if ((rc = regcomp(&regex, optarg, regex_flags)) != 0) {