Merge pull request #38025 from thaJeztah/itsy_bitsy_teeny_weeny

Remove redundant nil checks
This commit is contained in:
Vincent Demeester 2018-10-12 18:43:11 +02:00 committed by GitHub
commit 10ebe6381e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,9 +112,6 @@ func (daemon *Daemon) fillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
}
func fillDriverWarnings(v *types.Info) {
if v.DriverStatus == nil {
return
}
for _, pair := range v.DriverStatus {
if pair[0] == "Data loop file" {
msg := fmt.Sprintf("WARNING: %s: usage of loopback devices is "+
@ -140,9 +137,6 @@ func fillDriverWarnings(v *types.Info) {
}
func getBackingFs(v *types.Info) string {
if v.DriverStatus == nil {
return ""
}
for _, pair := range v.DriverStatus {
if pair[0] == "Backing Filesystem" {
return pair[1]