diff options
Diffstat (limited to 'src/microhttpd/mhd_str.c')
-rw-r--r-- | src/microhttpd/mhd_str.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/microhttpd/mhd_str.c b/src/microhttpd/mhd_str.c index 4222cbab..0526a1a5 100644 --- a/src/microhttpd/mhd_str.c +++ b/src/microhttpd/mhd_str.c | |||
@@ -697,7 +697,7 @@ MHD_str_remove_token_caseless_ (const char *str, | |||
697 | * Perform in-place case-insensitive removal of @a tokens from the @a str. | 697 | * Perform in-place case-insensitive removal of @a tokens from the @a str. |
698 | * | 698 | * |
699 | * Token could be surrounded by spaces and tabs and delimited by comma. | 699 | * Token could be surrounded by spaces and tabs and delimited by comma. |
700 | * The token match succeed if substring between start, end (of string) or | 700 | * The token match succeed if substring between start, end (of the string), or |
701 | * comma contains only case-insensitive token and optional spaces and tabs. | 701 | * comma contains only case-insensitive token and optional spaces and tabs. |
702 | * The quoted strings and comments are not supported by this function. | 702 | * The quoted strings and comments are not supported by this function. |
703 | * | 703 | * |
@@ -705,7 +705,7 @@ MHD_str_remove_token_caseless_ (const char *str, | |||
705 | * are removed, no whitespaces before commas, exactly one space is used after | 705 | * are removed, no whitespaces before commas, exactly one space is used after |
706 | * each comma. The string is updated in-place. | 706 | * each comma. The string is updated in-place. |
707 | * | 707 | * |
708 | * Behavior is undefined is input string in not normalised. | 708 | * Behavior is undefined is the input string in not normalised. |
709 | * | 709 | * |
710 | * @param[in,out] str the string to update | 710 | * @param[in,out] str the string to update |
711 | * @param[in,out] str_len the length of the @a str, not including optional | 711 | * @param[in,out] str_len the length of the @a str, not including optional |
@@ -753,13 +753,13 @@ MHD_str_remove_tokens_caseless_ (char *str, | |||
753 | pt++; | 753 | pt++; |
754 | } while (pt < tokens_len && | 754 | } while (pt < tokens_len && |
755 | (' ' != t[pt] && '\t' != t[pt] && ',' != t[pt])); | 755 | (' ' != t[pt] && '\t' != t[pt] && ',' != t[pt])); |
756 | /* Found end of token string, space, tab, or comma */ | 756 | /* Found end of the token string, space, tab, or comma */ |
757 | tkn_len = pt - (size_t) (tkn - t); | 757 | tkn_len = pt - (size_t) (tkn - t); |
758 | 758 | ||
759 | /* Skip all spaces and tabs */ | 759 | /* Skip all spaces and tabs */ |
760 | while (pt < tokens_len && (' ' == t[pt] || '\t' == t[pt])) | 760 | while (pt < tokens_len && (' ' == t[pt] || '\t' == t[pt])) |
761 | pt++; | 761 | pt++; |
762 | /* Found end of token string or non-whitespace char */ | 762 | /* Found end of the token string or non-whitespace char */ |
763 | } while(pt < tokens_len && ',' != t[pt]); | 763 | } while(pt < tokens_len && ',' != t[pt]); |
764 | 764 | ||
765 | /* 'tkn' is the input token with 'tkn_len' chars */ | 765 | /* 'tkn' is the input token with 'tkn_len' chars */ |
@@ -779,8 +779,8 @@ MHD_str_remove_tokens_caseless_ (char *str, | |||
779 | * It's know that 'tkn' is not equal to the 'str' (was checked previously). | 779 | * It's know that 'tkn' is not equal to the 'str' (was checked previously). |
780 | * As 'str' is normalized when 'tkn' is not equal to the 'str' | 780 | * As 'str' is normalized when 'tkn' is not equal to the 'str' |
781 | * it is required that 'str' to be at least 3 chars larger then 'tkn' | 781 | * it is required that 'str' to be at least 3 chars larger then 'tkn' |
782 | * (the comma, the space and at least one additional character) | 782 | * (the comma, the space and at least one additional character for the next |
783 | * to remove 'tkn' from the 'str'. */ | 783 | * token) to remove 'tkn' from the 'str'. */ |
784 | if (*str_len > tkn_len + 2) | 784 | if (*str_len > tkn_len + 2) |
785 | { /* Remove 'tkn' from the input string */ | 785 | { /* Remove 'tkn' from the input string */ |
786 | size_t pr; /**< the 'read' position in the @a str */ | 786 | size_t pr; /**< the 'read' position in the @a str */ |