mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-21 19:51:50 +00:00
Using IS_DIRSEP_CHAR() in remove_double_dots_and_double_slashes()
This commit is contained in:
1 parent
9d3af98a5e
commit
86e3cd262b
1 file changed
+2
-2
+2
-2
@@ -1696,9 +1696,9 @@ static void remove_double_dots_and_double_slashes(char *s) {
|
|||||||
|
|
||||||
while (*s != '\0') {
|
while (*s != '\0') {
|
||||||
*p++ = *s++;
|
*p++ = *s++;
|
||||||
if (s[-1] == '/' || s[-1] == DIRSEP) {
|
if (IS_DIRSEP_CHAR(s[-1])) {
|
||||||
// Skip all following slashes and backslashes
|
// Skip all following slashes and backslashes
|
||||||
while (*s == '/' || *s == DIRSEP) {
|
while (IS_DIRSEP_CHAR(s[0])) {
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user