[systemd-commits] 2 commits - src/bootchart src/shared

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Mon Mar 9 21:37:25 PDT 2015


 src/bootchart/bootchart.c |    2 +-
 src/shared/logs-show.c    |    2 +-
 src/shared/util.c         |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0c900704e7e9ad6732baf0e61b6817d76fc01fed
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Mar 10 05:25:28 2015 +0100

    Add type specifier for int

diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index 158f8a9..99ffb86 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -272,7 +272,7 @@ static void do_journal_append(char *file) {
         ssize_t n;
         _cleanup_free_ char *bootchart_file = NULL, *bootchart_message = NULL,
                 *p = NULL;
-        _cleanup_close_ fd = -1;
+        _cleanup_close_ int fd = -1;
 
         bootchart_file = strappend("BOOTCHART_FILE=", file);
         if (bootchart_file)
diff --git a/src/shared/util.c b/src/shared/util.c
index a13819e..b90e10f 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -2592,7 +2592,7 @@ char* dirname_malloc(const char *path) {
 int dev_urandom(void *p, size_t n) {
         static int have_syscall = -1;
 
-        _cleanup_close_ fd = -1;
+        _cleanup_close_ int fd = -1;
         int r;
 
         /* Gathers some randomness from the kernel. This call will

commit 6c767d1e1a1815fbd4d2b196fb92a0d85cfde5b2
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Mar 10 05:18:26 2015 +0100

    logs-show: fix check of loop_read_exact
    
    just a typo fix

diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index d3ee139..5a3ab3d 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -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);



More information about the systemd-commits mailing list