mirror of
https://github.com/curl/curl.git
synced 2026-07-23 21:57:21 +03:00
build: constify memchr()/strchr()/etc result variables (cont.)
Assisted-by: Rudi Heitbaum Fixes #20420 Follow-up to7dc60bdb90#20425 Follow-up to0e2507a3c6#20421 Closes #20428
This commit is contained in:
parent
6974bd7cc8
commit
4e5908306a
7 changed files with 9 additions and 9 deletions
|
|
@ -491,7 +491,7 @@ static int sws_ProcessRequest(struct sws_httprequest *req)
|
|||
|
||||
if(req->testno == DOCNUMBER_NOTHING) {
|
||||
/* check for a Testno: header with the test case number */
|
||||
char *testno = strstr(line, "\nTestno: ");
|
||||
const char *testno = strstr(line, "\nTestno: ");
|
||||
if(testno) {
|
||||
pval = &testno[9];
|
||||
if(!curlx_str_number(&pval, &num, INT_MAX)) {
|
||||
|
|
@ -596,7 +596,7 @@ static int sws_ProcessRequest(struct sws_httprequest *req)
|
|||
return 1; /* done */
|
||||
}
|
||||
else if(strstr(req->reqbuf, "\r\n0\r\n")) {
|
||||
char *last_crlf_char = strstr(req->reqbuf, "\r\n\r\n");
|
||||
const char *last_crlf_char = strstr(req->reqbuf, "\r\n\r\n");
|
||||
while(TRUE) {
|
||||
if(!strstr(last_crlf_char + 4, "\r\n\r\n"))
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue