- Forgot to check in these files.
parent
94b230dfb1
commit
14c4652e18
|
@ -232,7 +232,10 @@ ParseMACAddress(unsigned char *haddr, char *haddr_str)
|
|||
TRACE_CONFIG("MAC address length exceeds %d!\n", ETH_ALEN);
|
||||
exit(4);
|
||||
}
|
||||
sscanf(str, "%x", &temp);
|
||||
if (sscanf(str, "%x", &temp) < 1) {
|
||||
TRACE_CONFIG("sscanf failed!\n");
|
||||
exit(4);
|
||||
}
|
||||
haddr[i++] = temp;
|
||||
str = strtok_r(NULL, ":", &saveptr);
|
||||
}
|
||||
|
|
|
@ -891,7 +891,7 @@ InitializeMTCPManager(struct mtcp_thread_context* ctx)
|
|||
mtcp = (mtcp_manager_t)calloc(1, sizeof(struct mtcp_manager));
|
||||
if (!mtcp) {
|
||||
perror("malloc");
|
||||
CTRACE_ERROR("Failed to allocate mtcp_manager.\n");
|
||||
fprintf(stderr, "Failed to allocate mtcp_manager.\n");
|
||||
return NULL;
|
||||
}
|
||||
g_mtcp[ctx->cpu] = mtcp;
|
||||
|
|
|
@ -241,6 +241,7 @@ SetInterfaceInfo(char* dev_name_list)
|
|||
int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
|
||||
if (sock == -1) {
|
||||
perror("socket");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* getting address */
|
||||
|
@ -317,6 +318,7 @@ SetInterfaceInfo(char* dev_name_list)
|
|||
int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
|
||||
if (sock == -1) {
|
||||
perror("socket");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* getting address */
|
||||
|
|
Loading…
Reference in New Issue