chiark / gitweb /
journal: only use uint8_t for state
[elogind.git] / src / journal / journald.c
index 93cdec6c6c6dacebdec54994c30c80012aea21cf..baad3ab1adc8029b25cf9a71859c63b680a1490c 100644 (file)
@@ -154,13 +154,10 @@ static uint64_t available_space(Server *s) {
         for (;;) {
                 struct stat st;
                 struct dirent buf, *de;
-                int k;
 
-                k = readdir_r(d, &buf, &de);
-                if (k != 0) {
-                        r = -k;
-                        goto finish;
-                }
+                r = readdir_r(d, &buf, &de);
+                if (r != 0)
+                        break;
 
                 if (!de)
                         break;
@@ -1918,7 +1915,7 @@ static int system_journal_open(Server *s) {
                          * if it already exists, so that we can flush
                          * it into the system journal */
 
-                        r = journal_file_open_reliably(fn, O_RDWR, 0640, NULL, &s->runtime_journal);
+                        r = journal_file_open(fn, O_RDWR, 0640, NULL, &s->runtime_journal);
                         free(fn);
 
                         if (r < 0) {