sws: repair --port, and accept any port

Also for mqttd and sockfilt. The < 1025 check was not serving any
purpose.

Follow-up to bb1391f943
This commit is contained in:
Daniel Stenberg 2025-11-13 16:39:10 +01:00
parent 6384e2aca0
commit f2a75a14dd
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 3 additions and 3 deletions

View file

@ -801,7 +801,7 @@ static int test_mqttd(int argc, char *argv[])
arg++;
if(argc > arg) {
opt = argv[arg];
if(curlx_str_number(&opt, &num, 0xffff) || num < 1025) {
if(curlx_str_number(&opt, &num, 0xffff)) {
fprintf(stderr, "mqttd: invalid --port argument (%s)\n",
argv[arg]);
return 0;

View file

@ -1305,7 +1305,7 @@ static int test_sockfilt(int argc, char *argv[])
arg++;
if(argc > arg) {
opt = argv[arg];
if(curlx_str_number(&opt, &num, 0xffff) || num < 1025) {
if(curlx_str_number(&opt, &num, 0xffff)) {
fprintf(stderr, "sockfilt: invalid --connect argument (%s)\n",
argv[arg]);
return 0;

View file

@ -2096,7 +2096,7 @@ static int test_sws(int argc, char *argv[])
arg++;
if(argc > arg) {
opt = argv[arg];
if(curlx_str_number(&opt, &num, 0xffff) || num < 1025) {
if(curlx_str_number(&opt, &num, 0xffff)) {
fprintf(stderr, "sws: invalid --port argument (%s)\n",
argv[arg]);
return 0;