]> git.proxmox.com Git - mirror_frr.git/blobdiff - nhrpd/nhrp_vc.c
*: fix source file headers & includes for errcodes
[mirror_frr.git] / nhrpd / nhrp_vc.c
index c373411d66d9694a68597a74a2c25c5743295020..41a87d4adbc181c0170ae450da8d633158b53354 100644 (file)
@@ -48,14 +48,13 @@ static void *nhrp_vc_alloc(void *data)
        struct nhrp_vc *vc, *key = data;
 
        vc = XMALLOC(MTYPE_NHRP_VC, sizeof(struct nhrp_vc));
-       if (vc) {
-               *vc = (struct nhrp_vc){
-                       .local.nbma = key->local.nbma,
-                       .remote.nbma = key->remote.nbma,
-                       .notifier_list =
-                               NOTIFIER_LIST_INITIALIZER(&vc->notifier_list),
-               };
-       }
+
+       *vc = (struct nhrp_vc){
+               .local.nbma = key->local.nbma,
+               .remote.nbma = key->remote.nbma,
+               .notifier_list =
+               NOTIFIER_LIST_INITIALIZER(&vc->notifier_list),
+       };
 
        return vc;
 }
@@ -118,8 +117,6 @@ int nhrp_vc_ipsec_updown(uint32_t child_id, struct nhrp_vc *vc)
                        return 0;
 
                sa = XMALLOC(MTYPE_NHRP_VC, sizeof(struct child_sa));
-               if (!sa)
-                       return 0;
 
                *sa = (struct child_sa){
                        .id = child_id,