Remove some unnecessary memset() and an unused buffer in bound_if().
This commit is contained in:
parent
00ec886737
commit
675b527aac
@ -166,8 +166,6 @@ static void deconfig_if(void)
|
|||||||
int sockfd;
|
int sockfd;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
memset(buf, '\0', sizeof buf);
|
|
||||||
|
|
||||||
sockfd = open_ifch();
|
sockfd = open_ifch();
|
||||||
|
|
||||||
snprintf(buf, sizeof buf, "interface:%s:",
|
snprintf(buf, sizeof buf, "interface:%s:",
|
||||||
@ -209,14 +207,11 @@ static void translate_option(int sockfd, struct dhcpMessage *packet, int opt)
|
|||||||
static void bound_if(struct dhcpMessage *packet)
|
static void bound_if(struct dhcpMessage *packet)
|
||||||
{
|
{
|
||||||
int sockfd;
|
int sockfd;
|
||||||
char buf[256], buf2[256];
|
char buf[256];
|
||||||
char ip[32];
|
char ip[32];
|
||||||
|
|
||||||
if (!packet) return;
|
if (!packet)
|
||||||
|
return;
|
||||||
memset(buf, '\0', sizeof(buf));
|
|
||||||
memset(ip, '\0', sizeof(ip));
|
|
||||||
memset(buf2, '\0', sizeof(buf2));
|
|
||||||
|
|
||||||
sockfd = open_ifch();
|
sockfd = open_ifch();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user