summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-18 08:07:01 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-18 08:07:08 -0400
commita54e3b3d6a4fe28a39729f4c5ad11cd26706110c (patch)
tree787a7710d2622f178f337923bc62248c3be254b2 /src/journal
parentc2654883624885696edccd2a202873998ec208f1 (diff)
journalctl: fix signedness warning and boot-id syntax check
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journalctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 9a40d69a75..2f043a48d5 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -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;
}