mirror of
https://github.com/curl/curl.git
synced 2026-07-10 04:57:20 +03:00
tool_operate: remove call to abort()
Make an assert and return a plain error instead. No abort in release code. - also remove from two examples - add as a banned function in checksrc - document the banned state Closes #22182
This commit is contained in:
parent
397b8f0ec6
commit
d8f9f0a912
5 changed files with 6 additions and 3 deletions
|
|
@ -205,7 +205,7 @@ static int handle_socket(CURL *curl, curl_socket_t s, int action, void *userp,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
return -1; /* unknown */
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ static int cb_socket(CURL *curl, curl_socket_t s, int action,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
return -1; /* unknown */
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -348,6 +348,7 @@ This is the full list of functions generally banned.
|
|||
_wfopen
|
||||
_wfreopen
|
||||
_wopen
|
||||
abort
|
||||
accept
|
||||
accept4
|
||||
access
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ my %banfunc = (
|
|||
"_wfopen" => 1,
|
||||
"_wfreopen" => 1,
|
||||
"_wopen" => 1,
|
||||
"abort" => 1,
|
||||
"accept" => 1,
|
||||
"accept4" => 1,
|
||||
"access" => 1,
|
||||
|
|
|
|||
|
|
@ -1768,7 +1768,8 @@ static int cb_socket(CURL *easy, curl_socket_t s, int action,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
DEBUGASSERT(0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue