mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
fix compiler warning
This commit is contained in:
parent
19e089702a
commit
6e461e45c3
@ -1227,15 +1227,14 @@ int main(int argc, char *argv[])
|
||||
arg++;
|
||||
if(argc>arg) {
|
||||
char *endptr;
|
||||
long lnum = -1;
|
||||
lnum = strtol(argv[arg], &endptr, 10);
|
||||
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||
(lnum < 1025L) || (lnum > 65535L)) {
|
||||
(ulnum < 1025UL) || (ulnum > 65535UL)) {
|
||||
fprintf(stderr, "rtspd: invalid --port argument (%s)\n",
|
||||
argv[arg]);
|
||||
return 0;
|
||||
}
|
||||
port = (unsigned short)(lnum & 0xFFFFL);
|
||||
port = (unsigned short)(ulnum & 0xFFFFUL);
|
||||
arg++;
|
||||
}
|
||||
}
|
||||
|
@ -891,15 +891,14 @@ int main(int argc, char *argv[])
|
||||
arg++;
|
||||
if(argc>arg) {
|
||||
char *endptr;
|
||||
long lnum = -1;
|
||||
lnum = strtol(argv[arg], &endptr, 10);
|
||||
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||
((lnum != 0L) && ((lnum < 1025L) || (lnum > 65535L)))) {
|
||||
((ulnum != 0UL) && ((ulnum < 1025UL) || (ulnum > 65535UL)))) {
|
||||
fprintf(stderr, "sockfilt: invalid --port argument (%s)\n",
|
||||
argv[arg]);
|
||||
return 0;
|
||||
}
|
||||
port = (unsigned short)(lnum & 0xFFFFL);
|
||||
port = (unsigned short)(ulnum & 0xFFFFUL);
|
||||
arg++;
|
||||
}
|
||||
}
|
||||
@ -909,15 +908,14 @@ int main(int argc, char *argv[])
|
||||
arg++;
|
||||
if(argc>arg) {
|
||||
char *endptr;
|
||||
long lnum = -1;
|
||||
lnum = strtol(argv[arg], &endptr, 10);
|
||||
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||
(lnum < 1025L) || (lnum > 65535L)) {
|
||||
(ulnum < 1025UL) || (ulnum > 65535UL)) {
|
||||
fprintf(stderr, "sockfilt: invalid --connect argument (%s)\n",
|
||||
argv[arg]);
|
||||
return 0;
|
||||
}
|
||||
connectport = (unsigned short)(lnum & 0xFFFFL);
|
||||
connectport = (unsigned short)(ulnum & 0xFFFFUL);
|
||||
arg++;
|
||||
}
|
||||
}
|
||||
|
@ -1131,15 +1131,14 @@ int main(int argc, char *argv[])
|
||||
arg++;
|
||||
if(argc>arg) {
|
||||
char *endptr;
|
||||
long lnum = -1;
|
||||
lnum = strtol(argv[arg], &endptr, 10);
|
||||
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||
(lnum < 1025L) || (lnum > 65535L)) {
|
||||
(ulnum < 1025UL) || (ulnum > 65535UL)) {
|
||||
fprintf(stderr, "sws: invalid --port argument (%s)\n",
|
||||
argv[arg]);
|
||||
return 0;
|
||||
}
|
||||
port = (unsigned short)(lnum & 0xFFFFL);
|
||||
port = (unsigned short)(ulnum & 0xFFFFUL);
|
||||
arg++;
|
||||
}
|
||||
}
|
||||
|
@ -709,15 +709,14 @@ int main(int argc, char **argv)
|
||||
arg++;
|
||||
if(argc>arg) {
|
||||
char *endptr;
|
||||
long lnum = -1;
|
||||
lnum = strtol(argv[arg], &endptr, 10);
|
||||
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||
(lnum < 1025L) || (lnum > 65535L)) {
|
||||
(ulnum < 1025UL) || (ulnum > 65535UL)) {
|
||||
fprintf(stderr, "tftpd: invalid --port argument (%s)\n",
|
||||
argv[arg]);
|
||||
return 0;
|
||||
}
|
||||
port = (unsigned short)(lnum & 0xFFFFL);
|
||||
port = (unsigned short)(ulnum & 0xFFFFUL);
|
||||
arg++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user