X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fjournal%2Fjournalctl.c;h=083a5971160c75910724a8274f84510492df164e;hp=9a40d69a754ae8e3a7a3a5b09a671c10aaf99277;hb=2f5df74a5ec135ab2baebf26af6f088e5b4b8205;hpb=d121b396ccb19dc33aacfc75a7f7a719914267c8 diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 9a40d69a7..083a59711 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -133,7 +133,7 @@ static int help(void) { " -n --lines[=INTEGER] Number of journal entries to show\n" " --no-tail Show all lines, even in follow mode\n" " -r --reverse Show the newest entries first\n" - " -o --output=STRING Change journal output mode (short, short-monotonic,\n" + " -o --output=STRING Change journal output mode (short, short-monotonic, short-iso\n" " verbose, export, json, json-pretty, json-sse, cat)\n" " -x --catalog Add message explanations where available\n" " -l --full Do not ellipsize fields\n" @@ -744,7 +744,7 @@ static int get_relative_boot_id(sd_journal *j, sd_id128_t *boot_id, int relative if (!id || relative <= 0 ? (id - all_ids) + relative < 0 : - (id - all_ids) + relative >= count) + (id - all_ids) + relative >= (int) count) return -EADDRNOTAVAIL; *boot_id = (id + relative)->id; @@ -781,7 +781,7 @@ static int add_boot(sd_journal *j) { offset = arg_boot_descriptor + 32; - if (*offset != '-' && *offset != '+') { + if (*offset && *offset != '-' && *offset != '+') { log_error("Relative boot ID offset must start with a '+' or a '-', found '%s' ", offset); return -EINVAL; }