summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/if.c b/lib/if.c
index 5fdeb4540b..a31b44c7d5 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -519,10 +519,10 @@ const char *if_flag_dump(unsigned long flag)
#define IFF_OUT_LOG(X, STR) \
if (flag & (X)) { \
if (separator) \
- strlcat(logbuf, ",", BUFSIZ); \
+ strlcat(logbuf, ",", sizeof(logbuf)); \
else \
separator = 1; \
- strlcat(logbuf, STR, BUFSIZ); \
+ strlcat(logbuf, STR, sizeof(logbuf)); \
}
strlcpy(logbuf, "<", BUFSIZ);
@@ -548,7 +548,7 @@ const char *if_flag_dump(unsigned long flag)
IFF_OUT_LOG(IFF_IPV4, "IPv4");
IFF_OUT_LOG(IFF_IPV6, "IPv6");
- strlcat(logbuf, ">", BUFSIZ);
+ strlcat(logbuf, ">", sizeof(logbuf));
return logbuf;
#undef IFF_OUT_LOG
@@ -1310,8 +1310,8 @@ static int lib_interface_create(enum nb_event event,
return NB_OK;
}
-static int lib_interface_delete(enum nb_event event,
- const struct lyd_node *dnode)
+static int lib_interface_destroy(enum nb_event event,
+ const struct lyd_node *dnode)
{
struct interface *ifp;
@@ -1357,8 +1357,8 @@ static int lib_interface_description_modify(enum nb_event event,
return NB_OK;
}
-static int lib_interface_description_delete(enum nb_event event,
- const struct lyd_node *dnode)
+static int lib_interface_description_destroy(enum nb_event event,
+ const struct lyd_node *dnode)
{
struct interface *ifp;
@@ -1378,13 +1378,13 @@ const struct frr_yang_module_info frr_interface_info = {
{
.xpath = "/frr-interface:lib/interface",
.cbs.create = lib_interface_create,
- .cbs.destroy = lib_interface_delete,
+ .cbs.destroy = lib_interface_destroy,
.cbs.cli_show = cli_show_interface,
},
{
.xpath = "/frr-interface:lib/interface/description",
.cbs.modify = lib_interface_description_modify,
- .cbs.destroy = lib_interface_description_delete,
+ .cbs.destroy = lib_interface_description_destroy,
.cbs.cli_show = cli_show_interface_desc,
},
{