nil
check on slice SCC-S1009126}
127
128func mapExpr(m NamedArgs) map[string]*expr {
129 if m == nil || len(m) == 0 {130 return nil
131 }
132 res := make(map[string]*expr)
The length of a nil
slice evaluates to zero. Hence, there is no need to check
whether a slice is nil
before calculating its length.
if x != nil && len(x) != 0 {
x[0] = 1
}
if len(x) != 0 {
x[0] = 1
}