mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Fixed Inappropriate Logical Expression
The length of `finalInterceptors` will always be a non-zero value. In that case, the comparison will always return a True value, making the comparison meaningless. Signed-off-by: fazledyn-or <ataf@openrefactory.com>
This commit is contained in:
parent
8a9e0d936a
commit
d317b01244
@ -84,9 +84,7 @@ func startGRPCServer(logger klog.Logger, grpcVerbosity int, interceptors []grpc.
|
||||
finalInterceptors = append(finalInterceptors, s.interceptor)
|
||||
}
|
||||
finalInterceptors = append(finalInterceptors, interceptors...)
|
||||
if len(finalInterceptors) >= 0 {
|
||||
opts = append(opts, grpc.ChainUnaryInterceptor(finalInterceptors...))
|
||||
}
|
||||
opts = append(opts, grpc.ChainUnaryInterceptor(finalInterceptors...))
|
||||
s.server = grpc.NewServer(opts...)
|
||||
for _, service := range services {
|
||||
service(s.server)
|
||||
|
Loading…
Reference in New Issue
Block a user