mirror of
https://github.com/docker/cli.git
synced 2026-09-27 17:56:04 -04:00
Merge pull request #16283 from nalind/journald-not-nil
Remove unnecessary check for nil CString Upstream-commit: a90ed92df0b55cea8d2cf64858db10aeacf6775c Component: engine
This commit is contained in:
@@ -220,10 +220,6 @@ func (s *journald) readLogs(logWatcher *logger.LogWatcher, config logger.ReadCon
|
||||
}
|
||||
// Add a match to have the library do the searching for us.
|
||||
cmatch = C.CString("CONTAINER_ID_FULL=" + s.vars["CONTAINER_ID_FULL"])
|
||||
if cmatch == nil {
|
||||
logWatcher.Err <- fmt.Errorf("error reading container ID")
|
||||
return
|
||||
}
|
||||
defer C.free(unsafe.Pointer(cmatch))
|
||||
rc = C.sd_journal_add_match(j, unsafe.Pointer(cmatch), C.strlen(cmatch))
|
||||
if rc != 0 {
|
||||
|
||||
Reference in New Issue
Block a user