Skip to content

Commit

Permalink
renamed error variable to avoid overwriting
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdorame committed Dec 5, 2023
1 parent c11acf9 commit 8cbc31e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ipamd/rpc_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ func (s *server) AddNetwork(ctx context.Context, in *rpc.AddNetworkRequest) (*rp

if s.ipamContext.enablePodIPAnnotation {
// On ADD, we pass empty string as there is no IP being released
err = s.ipamContext.AnnotatePod(in.K8S_POD_NAME, in.K8S_POD_NAMESPACE, vpccniPodIPKey, ipv4Addr, "")
if err != nil {
log.Errorf("Failed to add the pod annotation: %v", err)
var annotatePodErr = s.ipamContext.AnnotatePod(in.K8S_POD_NAME, in.K8S_POD_NAMESPACE, vpccniPodIPKey, ipv4Addr, "")
if annotatePodErr != nil {
log.Errorf("Failed to add the pod annotation: %v", annotatePodErr)
}
}
resp := rpc.AddNetworkReply{
Expand Down

0 comments on commit 8cbc31e

Please sign in to comment.