Lines 21-27
Link Here
|
21 |
|
21 |
|
22 |
static int check_port(char * port) |
22 |
static int check_port(char * port) |
23 |
{ |
23 |
{ |
24 |
long long ret = strtol(port,NULL,10); |
24 |
long long ret = 0; |
|
|
25 |
errno = 0; |
26 |
ret = strtol(port,NULL,10); |
25 |
if ((ret<0) || (ret>32767)) return -1; |
27 |
if ((ret<0) || (ret>32767)) return -1; |
26 |
if (errno) { |
28 |
if (errno) { |
27 |
printf("port error\n"); |
29 |
printf("port error\n"); |