diff options
Diffstat (limited to 'networking/nameif.c')
-rw-r--r-- | networking/nameif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/nameif.c b/networking/nameif.c index 8590a98ad..7dc48ec16 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
@@ -105,7 +105,7 @@ int nameif_main(int argc, char **argv) | |||
105 | 105 | ||
106 | if (strlen(*a) > IF_NAMESIZE) | 106 | if (strlen(*a) > IF_NAMESIZE) |
107 | serror("interface name `%s' too long", *a); | 107 | serror("interface name `%s' too long", *a); |
108 | ch = xcalloc(1, sizeof(mactable_t)); | 108 | ch = xzalloc(sizeof(mactable_t)); |
109 | ch->ifname = bb_xstrdup(*a++); | 109 | ch->ifname = bb_xstrdup(*a++); |
110 | ch->mac = cc_macaddr(*a++); | 110 | ch->mac = cc_macaddr(*a++); |
111 | if (clist) | 111 | if (clist) |
@@ -126,7 +126,7 @@ int nameif_main(int argc, char **argv) | |||
126 | continue; | 126 | continue; |
127 | } | 127 | } |
128 | name_length = strcspn(line_ptr, " \t"); | 128 | name_length = strcspn(line_ptr, " \t"); |
129 | ch = xcalloc(1, sizeof(mactable_t)); | 129 | ch = xzalloc(sizeof(mactable_t)); |
130 | ch->ifname = bb_xstrndup(line_ptr, name_length); | 130 | ch->ifname = bb_xstrndup(line_ptr, name_length); |
131 | if (name_length > IF_NAMESIZE) | 131 | if (name_length > IF_NAMESIZE) |
132 | serror("interface name `%s' too long", ch->ifname); | 132 | serror("interface name `%s' too long", ch->ifname); |