]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-upload-journal: reduce indentation a bit
authorLennart Poettering <lennart@poettering.net>
Thu, 3 Apr 2025 13:03:07 +0000 (15:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 May 2025 13:39:57 +0000 (15:39 +0200)
src/journal-remote/journal-upload-journal.c

index eae8142c6bcddf3e6308ed24f51f78667757b15a..c910c22424667eb5821c8f2a7bf237b50316af86 100644 (file)
@@ -133,7 +133,7 @@ static ssize_t write_entry(char *buf, size_t size, Uploader *u) {
                                                       &u->field_length);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to move to next field in entry: %m");
-                        else if (r == 0) {
+                        if (r == 0) {
                                 u->entry_state = ENTRY_OUTRO;
                                 continue;
                         }
@@ -171,10 +171,10 @@ static ssize_t write_entry(char *buf, size_t size, Uploader *u) {
                                 pos += tocopy + 1;
                                 u->entry_state = ENTRY_NEW_FIELD;
                                 continue;
-                        } else {
-                                u->field_pos += tocopy;
-                                return size;
                         }
+
+                        u->field_pos += tocopy;
+                        return size;
                 }
 
                 case ENTRY_BINARY_FIELD_START: {