mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:23:31 +03:00
fix compiler warning
This commit is contained in:
parent
2ea70a5c73
commit
4acbe8f20c
4 changed files with 19 additions and 15 deletions
13
lib/http.c
13
lib/http.c
|
|
@ -203,10 +203,9 @@ char *Curl_copy_header_value(const char *h)
|
|||
++h;
|
||||
|
||||
/* Find the first non-space letter */
|
||||
for(start=h;
|
||||
*start && ISSPACE(*start);
|
||||
start++)
|
||||
; /* empty loop */
|
||||
start = h;
|
||||
while(*start && ISSPACE(*start))
|
||||
start++;
|
||||
|
||||
/* data is in the host encoding so
|
||||
use '\r' and '\n' instead of 0x0d and 0x0a */
|
||||
|
|
@ -215,10 +214,12 @@ char *Curl_copy_header_value(const char *h)
|
|||
end = strchr(start, '\n');
|
||||
if(!end)
|
||||
end = strchr(start, '\0');
|
||||
if(!end)
|
||||
return NULL;
|
||||
|
||||
/* skip all trailing space letters */
|
||||
for(; ISSPACE(*end) && (end > start); end--)
|
||||
; /* empty loop */
|
||||
while((end > start) && ISSPACE(*end))
|
||||
end--;
|
||||
|
||||
/* get length of the type */
|
||||
len = end-start+1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue