mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:43:33 +03:00
code style: use spaces around equals signs
This commit is contained in:
parent
e155f38d1e
commit
6b84438d9a
144 changed files with 995 additions and 990 deletions
26
lib/dotdot.c
26
lib/dotdot.c
|
|
@ -92,25 +92,25 @@ char *Curl_dedotdotify(const char *input)
|
|||
remove that prefix from the input buffer; otherwise, */
|
||||
|
||||
if(!strncmp("./", clone, 2)) {
|
||||
clone+=2;
|
||||
clen-=2;
|
||||
clone += 2;
|
||||
clen -= 2;
|
||||
}
|
||||
else if(!strncmp("../", clone, 3)) {
|
||||
clone+=3;
|
||||
clen-=3;
|
||||
clone += 3;
|
||||
clen -= 3;
|
||||
}
|
||||
|
||||
/* B. if the input buffer begins with a prefix of "/./" or "/.", where
|
||||
"." is a complete path segment, then replace that prefix with "/" in
|
||||
the input buffer; otherwise, */
|
||||
else if(!strncmp("/./", clone, 3)) {
|
||||
clone+=2;
|
||||
clen-=2;
|
||||
clone += 2;
|
||||
clen -= 2;
|
||||
}
|
||||
else if(!strcmp("/.", clone)) {
|
||||
clone[1]='/';
|
||||
clone++;
|
||||
clen-=1;
|
||||
clen -= 1;
|
||||
}
|
||||
|
||||
/* C. if the input buffer begins with a prefix of "/../" or "/..", where
|
||||
|
|
@ -119,8 +119,8 @@ char *Curl_dedotdotify(const char *input)
|
|||
any) from the output buffer; otherwise, */
|
||||
|
||||
else if(!strncmp("/../", clone, 4)) {
|
||||
clone+=3;
|
||||
clen-=3;
|
||||
clone += 3;
|
||||
clen -= 3;
|
||||
/* remove the last segment from the output buffer */
|
||||
while(outptr > out) {
|
||||
outptr--;
|
||||
|
|
@ -131,8 +131,8 @@ char *Curl_dedotdotify(const char *input)
|
|||
}
|
||||
else if(!strcmp("/..", clone)) {
|
||||
clone[2]='/';
|
||||
clone+=2;
|
||||
clen-=2;
|
||||
clone += 2;
|
||||
clen -= 2;
|
||||
/* remove the last segment from the output buffer */
|
||||
while(outptr > out) {
|
||||
outptr--;
|
||||
|
|
@ -146,8 +146,8 @@ char *Curl_dedotdotify(const char *input)
|
|||
that from the input buffer; otherwise, */
|
||||
|
||||
else if(!strcmp(".", clone) || !strcmp("..", clone)) {
|
||||
*clone=0;
|
||||
*out=0;
|
||||
*clone = 0;
|
||||
*out = 0;
|
||||
}
|
||||
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue