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:
Daniel Stenberg 2026-06-26 09:37:09 +02:00
parent 397b8f0ec6
commit d8f9f0a912
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 6 additions and 3 deletions

View file

@ -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;

View file

@ -219,7 +219,7 @@ static int cb_socket(CURL *curl, curl_socket_t s, int action,
}
break;
default:
abort();
return -1; /* unknown */
}
return 0;