mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -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++;
|
arg++;
|
||||||
if(argc>arg) {
|
if(argc>arg) {
|
||||||
char *endptr;
|
char *endptr;
|
||||||
long lnum = -1;
|
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||||
lnum = strtol(argv[arg], &endptr, 10);
|
|
||||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||||
(lnum < 1025L) || (lnum > 65535L)) {
|
(ulnum < 1025UL) || (ulnum > 65535UL)) {
|
||||||
fprintf(stderr, "rtspd: invalid --port argument (%s)\n",
|
fprintf(stderr, "rtspd: invalid --port argument (%s)\n",
|
||||||
argv[arg]);
|
argv[arg]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
port = (unsigned short)(lnum & 0xFFFFL);
|
port = (unsigned short)(ulnum & 0xFFFFUL);
|
||||||
arg++;
|
arg++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -891,15 +891,14 @@ int main(int argc, char *argv[])
|
|||||||
arg++;
|
arg++;
|
||||||
if(argc>arg) {
|
if(argc>arg) {
|
||||||
char *endptr;
|
char *endptr;
|
||||||
long lnum = -1;
|
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||||
lnum = strtol(argv[arg], &endptr, 10);
|
|
||||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
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",
|
fprintf(stderr, "sockfilt: invalid --port argument (%s)\n",
|
||||||
argv[arg]);
|
argv[arg]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
port = (unsigned short)(lnum & 0xFFFFL);
|
port = (unsigned short)(ulnum & 0xFFFFUL);
|
||||||
arg++;
|
arg++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -909,15 +908,14 @@ int main(int argc, char *argv[])
|
|||||||
arg++;
|
arg++;
|
||||||
if(argc>arg) {
|
if(argc>arg) {
|
||||||
char *endptr;
|
char *endptr;
|
||||||
long lnum = -1;
|
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||||
lnum = strtol(argv[arg], &endptr, 10);
|
|
||||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||||
(lnum < 1025L) || (lnum > 65535L)) {
|
(ulnum < 1025UL) || (ulnum > 65535UL)) {
|
||||||
fprintf(stderr, "sockfilt: invalid --connect argument (%s)\n",
|
fprintf(stderr, "sockfilt: invalid --connect argument (%s)\n",
|
||||||
argv[arg]);
|
argv[arg]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
connectport = (unsigned short)(lnum & 0xFFFFL);
|
connectport = (unsigned short)(ulnum & 0xFFFFUL);
|
||||||
arg++;
|
arg++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1131,15 +1131,14 @@ int main(int argc, char *argv[])
|
|||||||
arg++;
|
arg++;
|
||||||
if(argc>arg) {
|
if(argc>arg) {
|
||||||
char *endptr;
|
char *endptr;
|
||||||
long lnum = -1;
|
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||||
lnum = strtol(argv[arg], &endptr, 10);
|
|
||||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||||
(lnum < 1025L) || (lnum > 65535L)) {
|
(ulnum < 1025UL) || (ulnum > 65535UL)) {
|
||||||
fprintf(stderr, "sws: invalid --port argument (%s)\n",
|
fprintf(stderr, "sws: invalid --port argument (%s)\n",
|
||||||
argv[arg]);
|
argv[arg]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
port = (unsigned short)(lnum & 0xFFFFL);
|
port = (unsigned short)(ulnum & 0xFFFFUL);
|
||||||
arg++;
|
arg++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -709,15 +709,14 @@ int main(int argc, char **argv)
|
|||||||
arg++;
|
arg++;
|
||||||
if(argc>arg) {
|
if(argc>arg) {
|
||||||
char *endptr;
|
char *endptr;
|
||||||
long lnum = -1;
|
unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
|
||||||
lnum = strtol(argv[arg], &endptr, 10);
|
|
||||||
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
if((endptr != argv[arg] + strlen(argv[arg])) ||
|
||||||
(lnum < 1025L) || (lnum > 65535L)) {
|
(ulnum < 1025UL) || (ulnum > 65535UL)) {
|
||||||
fprintf(stderr, "tftpd: invalid --port argument (%s)\n",
|
fprintf(stderr, "tftpd: invalid --port argument (%s)\n",
|
||||||
argv[arg]);
|
argv[arg]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
port = (unsigned short)(lnum & 0xFFFFL);
|
port = (unsigned short)(ulnum & 0xFFFFUL);
|
||||||
arg++;
|
arg++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user