Browse code

journald/read: simplify code

Minor code simplification.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit e8f6166791c097deb15c39f8dddf6f97be65b224)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2019/03/10 09:27:14
Showing 1 changed files
... ...
@@ -216,12 +216,12 @@ drain:
216 216
 			// the stream that we would have
217 217
 			// assigned that value.
218 218
 			source := ""
219
-			if C.get_priority(j, &priority) != 0 {
220
-				source = ""
221
-			} else if priority == C.int(journal.PriErr) {
222
-				source = "stderr"
223
-			} else if priority == C.int(journal.PriInfo) {
224
-				source = "stdout"
219
+			if C.get_priority(j, &priority) == 0 {
220
+				if priority == C.int(journal.PriErr) {
221
+					source = "stderr"
222
+				} else if priority == C.int(journal.PriInfo) {
223
+					source = "stdout"
224
+				}
225 225
 			}
226 226
 			// Retrieve the values of any variables we're adding to the journal.
227 227
 			var attrs []backend.LogAttr