From 73c93896cb5f4cb8450087a2a595286ee18db3d7 Mon Sep 17 00:00:00 2001
From: brabo <brabo@cryptolab.net>
Date: Sun, 2 Jun 2019 14:37:40 +0200
Subject: [PATCH] gtk/fetch.c & monkey/filetype.c: ascii_is_space already
 checks for newline.

---
 frontends/gtk/fetch.c       | 8 ++------
 frontends/monkey/filetype.c | 5 ++---
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/frontends/gtk/fetch.c b/frontends/gtk/fetch.c
index e1550ffe8..58bd0b853 100644
--- a/frontends/gtk/fetch.c
+++ b/frontends/gtk/fetch.c
@@ -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++;
 				}
 
diff --git a/frontends/monkey/filetype.c b/frontends/monkey/filetype.c
index af93ef607..37853a63d 100644
--- a/frontends/monkey/filetype.c
+++ b/frontends/monkey/filetype.c
@@ -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') {
-- 
2.20.1

