X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fdiscoverservice%2Fdiscoverservice.go;h=4ab8a92c66fa0468285959e10725292875ef77fd;hb=82ee8ffe35ceb72b40b738872b57186130f210df;hp=797eaa7cf2e4f126135b918694118721e40bf9e0;hpb=d0199885b0bc379f22dbb7012545f0049f979bac;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/discoverservice/discoverservice.go b/capifcore/internal/discoverservice/discoverservice.go index 797eaa7..4ab8a92 100644 --- a/capifcore/internal/discoverservice/discoverservice.go +++ b/capifcore/internal/discoverservice/discoverservice.go @@ -141,18 +141,12 @@ func checkVersion(version publishapi.Version, wantedVersion *string, commType *p } func checkCommType(resources *[]publishapi.Resource, commType *publishapi.CommunicationType) bool { - match := false - if commType != nil { - for _, resource := range *resources { - if resource.CommType == *commType { - match = true - break - } + for _, resource := range *resources { + if resource.CommType == *commType { + return true } - } else { - match = true } - return match + return false } // This function wraps sending of an error in the Error format, and