gtk/fetch.c & monkey/filetype.c: ascii_is_space already checks for newline.
This commit is contained in:
parent
c90bfb23ad
commit
ba9f5f8ef0
|
@ -119,9 +119,7 @@ void gtk_fetch_filetype_init(const char *mimefile)
|
|||
|
||||
/* search for the first whitespace char or NUL or
|
||||
* NL */
|
||||
while (*ptr &&
|
||||
(!ascii_is_space(*ptr)) &&
|
||||
*ptr != '\n') {
|
||||
while (*ptr && (!ascii_is_space(*ptr))) {
|
||||
ptr++;
|
||||
}
|
||||
|
||||
|
@ -146,9 +144,7 @@ void gtk_fetch_filetype_init(const char *mimefile)
|
|||
/* search for the first whitespace char or
|
||||
* NUL or NL which is the end of the ext.
|
||||
*/
|
||||
while (*ptr &&
|
||||
(!ascii_is_space(*ptr)) &&
|
||||
*ptr != '\n') {
|
||||
while (*ptr && (!ascii_is_space(*ptr))) {
|
||||
ptr++;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ void monkey_fetch_filetype_init(const char *mimefile)
|
|||
|
||||
/* search for the first whitespace char or NUL or
|
||||
* NL */
|
||||
while (*ptr && (!ascii_is_space(*ptr)) && *ptr != '\n')
|
||||
while (*ptr && (!ascii_is_space(*ptr)))
|
||||
ptr++;
|
||||
|
||||
if (*ptr == '\0' || *ptr == '\n') {
|
||||
|
@ -135,8 +135,7 @@ void monkey_fetch_filetype_init(const char *mimefile)
|
|||
/* search for the first whitespace char or
|
||||
* NUL or NL which is the end of the ext.
|
||||
*/
|
||||
while (*ptr && (!ascii_is_space(*ptr)) &&
|
||||
*ptr != '\n')
|
||||
while (*ptr && (!ascii_is_space(*ptr)))
|
||||
ptr++;
|
||||
|
||||
if (*ptr == '\0' || *ptr == '\n') {
|
||||
|
|
Loading…
Reference in New Issue