logs-show: fix check of loop_read_exact
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 10 Mar 2015 04:18:26 +0000 (05:18 +0100)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 10 Mar 2015 04:37:01 +0000 (05:37 +0100)
just a typo fix

src/shared/logs-show.c

index d3ee139..5a3ab3d 100644 (file)
@@ -1165,7 +1165,7 @@ static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) {
 
                 r = loop_read_exact(fd, buf, 36, false);
                 safe_close(fd);
-                if (k < 0)
+                if (r < 0)
                         _exit(EXIT_FAILURE);
 
                 k = send(pair[1], buf, 36, MSG_NOSIGNAL);