From 79135644c358c91764e55b0d9b2a555eb3c1e5f1 Mon Sep 17 00:00:00 2001 From: rejain456 Date: Tue, 21 Jan 2025 08:40:52 -0800 Subject: [PATCH] updated return inline --- cns/middlewares/k8sSwiftV2.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cns/middlewares/k8sSwiftV2.go b/cns/middlewares/k8sSwiftV2.go index 026fd268b4..c40321c9dd 100644 --- a/cns/middlewares/k8sSwiftV2.go +++ b/cns/middlewares/k8sSwiftV2.go @@ -182,10 +182,7 @@ func ValidateSwiftv2Pod(pod v1.Pod) bool { // check the pod labels for Swift V2 _, swiftV2PodNetworkLabel := pod.Labels[configuration.LabelPodSwiftV2] _, swiftV2PodNetworkInstanceLabel := pod.Labels[configuration.LabelPodNetworkInstanceSwiftV2] - if swiftV2PodNetworkLabel || swiftV2PodNetworkInstanceLabel { - return true - } - return false + return swiftV2PodNetworkLabel || swiftV2PodNetworkInstanceLabel } func (k *K8sSWIFTv2Middleware) getMTPNC(ctx context.Context, podInfo cns.PodInfo) (mtpncResource v1alpha1.MultitenantPodNetworkConfig, respCode types.ResponseCode, message string) {