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 /lib/if.c | |
| parent | b19abe1131daa38d1d0e31c4793925bb89f11c07 (diff) | |
| parent | 25af5f0d79f9e5595b1ba3bb04a0aff876471029 (diff) | |
Merge pull request #3869 from qlyoung/cocci-fixes
Assorted Coccinelle fixes
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -234,8 +234,7 @@ void if_delete(struct interface *ifp) if_link_params_free(ifp); - if (ifp->desc) - XFREE(MTYPE_TMP, ifp->desc); + XFREE(MTYPE_TMP, ifp->desc); XFREE(MTYPE_IF, ifp); } @@ -708,8 +707,7 @@ void connected_free(struct connected *connected) if (connected->destination) prefix_free(connected->destination); - if (connected->label) - XFREE(MTYPE_CONNECTED_LABEL, connected->label); + XFREE(MTYPE_CONNECTED_LABEL, connected->label); XFREE(MTYPE_CONNECTED, connected); } @@ -1349,8 +1347,7 @@ static int lib_interface_description_modify(enum nb_event event, return NB_OK; ifp = yang_dnode_get_entry(dnode, true); - if (ifp->desc) - XFREE(MTYPE_TMP, ifp->desc); + XFREE(MTYPE_TMP, ifp->desc); description = yang_dnode_get_string(dnode, NULL); ifp->desc = XSTRDUP(MTYPE_TMP, description); @@ -1366,8 +1363,7 @@ static int lib_interface_description_delete(enum nb_event event, return NB_OK; ifp = yang_dnode_get_entry(dnode, true); - if (ifp->desc) - XFREE(MTYPE_TMP, ifp->desc); + XFREE(MTYPE_TMP, ifp->desc); return NB_OK; } |
