journald/read: simplify code
Minor code simplification.
@@ -216,13 +216,13 @@ drain:
// the stream that we would have
// assigned that value.
source := ""
- if C.get_priority(j, &priority) != 0 {
- source = ""
- } else if priority == C.int(journal.PriErr) {
+ if C.get_priority(j, &priority) == 0 {
+ if priority == C.int(journal.PriErr) {
source = "stderr"
} else if priority == C.int(journal.PriInfo) {
source = "stdout"
}
+ }
// Retrieve the values of any variables we're adding to the journal.
var attrs []backend.LogAttr
C.sd_journal_restart_data(j)
