Fix possible NULL to atoi
Fix possible NULL to atoi
This commit is contained in:
@ -781,7 +781,7 @@ int error_count = 0;
|
||||
/* if id is not set, do it now */
|
||||
if (gateway.id == 0) {
|
||||
setipaddress(&serv_addr.sin_addr, (address == NULL) ? "0.0.0.0" : address);
|
||||
gateway.id = (unsigned long) (serv_addr.sin_addr.s_addr + atoi(port) + getpid());
|
||||
gateway.id = (unsigned long) (serv_addr.sin_addr.s_addr + port != NULL ? atoi(port) : 0 + getpid());
|
||||
}
|
||||
|
||||
if (service && socket && protocol) {
|
||||
|
||||
Reference in New Issue
Block a user