]> git.proxmox.com Git - proxmox-mini-journalreader.git/commitdiff
follouwp whitespace fixes
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 16 May 2019 14:52:18 +0000 (16:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 16 May 2019 14:52:18 +0000 (16:52 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/mini-journalreader.c

index d5c55fd873be2018d970dd6ad97baef43fe9ebbb..92176ac50ad1c71bf3de8fedca68ddc7bc51de82 100644 (file)
@@ -38,7 +38,7 @@ static uint64_t get_timestamp(sd_journal *j) {
     int r = sd_journal_get_realtime_usec(j, &timestamp);
     if (r < 0) {
         fprintf(stderr, "Failed  %s\n", strerror(-r));
-        return (uint64_t)-1;
+        return (uint64_t) -1;
     }
     return timestamp;
 }
@@ -50,8 +50,8 @@ static void print_to_buf(const char * string, size_t length) {
 
     size_t r = fwrite_unlocked(string, 1, length, stdout);
     if (r < length) {
-       fprintf(stderr, "Failed to write\n");
-       exit(1);
+        fprintf(stderr, "Failed to write\n");
+        exit(1);
     }
 }
 
@@ -102,8 +102,8 @@ static void print_reboot(sd_journal *j) {
 
 static void print_timestamp(sd_journal *j) {
     uint64_t timestamp = get_timestamp(j);
-    if (timestamp == (uint64_t)-1) {
-       return;
+    if (timestamp == (uint64_t) -1) {
+        return;
     }
 
     static uint64_t last_timestamp;
@@ -265,8 +265,8 @@ int main(int argc, char *argv[]) {
 
     // setup stdout buffer
     if (setvbuf(stdout, BUF, _IOFBF, BUFSIZE)) {
-       fprintf(stderr, "Failed to set buffer for stdout: %s\n", strerror(errno));
-       return 1;
+        fprintf(stderr, "Failed to set buffer for stdout: %s\n", strerror(errno));
+        return 1;
     }
 
     // to prevent calling it everytime we generate a timestamp