diff options
author | David Lamparter <equinox@diac24.net> | 2019-03-06 15:54:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 15:54:44 +0100 |
commit | d3b05897edff14ceb71c2f5603a9fcdb1ae10c83 (patch) | |
tree | 274b088939d9686c289d5de95d70cdb39a01e4b4 /ripd | |
parent | Revert "nhrpd: strncpy -> strlcpy" (diff) | |
parent | tools: add coccinelle spatches (diff) | |
download | frr-d3b05897edff14ceb71c2f5603a9fcdb1ae10c83.tar.xz frr-d3b05897edff14ceb71c2f5603a9fcdb1ae10c83.zip |
Merge pull request #3869 from qlyoung/cocci-fixes
Assorted Coccinelle fixes
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/rip_interface.c | 6 | ||||
-rw-r--r-- | ripd/rip_northbound.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 9575f6b8a..8bad6b8b1 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -510,11 +510,9 @@ static void rip_interface_reset(struct rip_interface *ri) ri->ri_receive = yang_get_default_enum("%s/version-receive", RIP_IFACE); ri->v2_broadcast = yang_get_default_bool("%s/v2-broadcast", RIP_IFACE); - if (ri->auth_str) - XFREE(MTYPE_RIP_INTERFACE_STRING, ri->auth_str); + XFREE(MTYPE_RIP_INTERFACE_STRING, ri->auth_str); - if (ri->key_chain) - XFREE(MTYPE_RIP_INTERFACE_STRING, ri->key_chain); + XFREE(MTYPE_RIP_INTERFACE_STRING, ri->key_chain); ri->list[RIP_FILTER_IN] = NULL; ri->list[RIP_FILTER_OUT] = NULL; diff --git a/ripd/rip_northbound.c b/ripd/rip_northbound.c index 1e5f86eff..f3b5dc2dc 100644 --- a/ripd/rip_northbound.c +++ b/ripd/rip_northbound.c @@ -937,8 +937,7 @@ lib_interface_rip_authentication_password_modify(enum nb_event event, ifp = yang_dnode_get_entry(dnode, true); ri = ifp->info; - if (ri->auth_str) - XFREE(MTYPE_RIP_INTERFACE_STRING, ri->auth_str); + XFREE(MTYPE_RIP_INTERFACE_STRING, ri->auth_str); ri->auth_str = XSTRDUP(MTYPE_RIP_INTERFACE_STRING, yang_dnode_get_string(dnode, NULL)); @@ -978,8 +977,7 @@ lib_interface_rip_authentication_key_chain_modify(enum nb_event event, ifp = yang_dnode_get_entry(dnode, true); ri = ifp->info; - if (ri->key_chain) - XFREE(MTYPE_RIP_INTERFACE_STRING, ri->key_chain); + XFREE(MTYPE_RIP_INTERFACE_STRING, ri->key_chain); ri->key_chain = XSTRDUP(MTYPE_RIP_INTERFACE_STRING, yang_dnode_get_string(dnode, NULL)); |