X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flogs-show.c;h=4e1b87814be77556fb940804247b2ff5051b1111;hb=d8d5781c1eb031477670facc132e198f8fddd56c;hp=944d6856cd8315a785d39817a093a13d8c71c4cf;hpb=2eec67acbb00593e414549a7e5b35eb7dd776b1b;p=elogind.git diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index 944d6856c..4e1b87814 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -990,7 +990,7 @@ static int show_journal(FILE *f, if (warn_cutoff && line < how_many && not_before > 0) { sd_id128_t boot_id; - usec_t cutoff; + usec_t cutoff = 0; /* Check whether the cutoff line is too early */ @@ -1163,9 +1163,9 @@ static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) { if (fd < 0) _exit(EXIT_FAILURE); - k = loop_read(fd, buf, 36, false); + r = loop_read_exact(fd, buf, 36, false); safe_close(fd); - if (k != 36) + if (r < 0) _exit(EXIT_FAILURE); k = send(pair[1], buf, 36, MSG_NOSIGNAL);