mirror of
https://github.com/curl/curl.git
synced 2026-07-30 00:48:02 +03:00
strparse: split a multi-line assert into many separate ones
This way we can better tell exactly which condition that triggers. Like in fuzzer logs. Closes #21599
This commit is contained in:
parent
db4a6f286b
commit
81f950dd90
1 changed files with 7 additions and 2 deletions
|
|
@ -49,9 +49,14 @@ void curlx_str_trim(struct Curl_str *out, size_t len)
|
|||
int curlx_str_until(const char **linep, struct Curl_str *out,
|
||||
const size_t max, char delim)
|
||||
{
|
||||
const char *s = *linep;
|
||||
const char *s;
|
||||
size_t len = 0;
|
||||
DEBUGASSERT(linep && *linep && out && max && delim);
|
||||
DEBUGASSERT(linep);
|
||||
DEBUGASSERT(*linep);
|
||||
DEBUGASSERT(out);
|
||||
DEBUGASSERT(max);
|
||||
DEBUGASSERT(delim);
|
||||
s = *linep;
|
||||
|
||||
curlx_str_init(out);
|
||||
while(*s && (*s != delim)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue