commit c4ec188: [Minor] Remove redundant cycle

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Aug 5 11:28:06 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-08-05 12:24:38 +0100
URL: https://github.com/rspamd/rspamd/commit/c4ec1883f7b8b60ff6d548eb2d1d8dca040346f5 (HEAD -> master)

[Minor] Remove redundant cycle

---
 src/libserver/html/html_url.cxx | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/libserver/html/html_url.cxx b/src/libserver/html/html_url.cxx
index 781b4bb59..22f201f8c 100644
--- a/src/libserver/html/html_url.cxx
+++ b/src/libserver/html/html_url.cxx
@@ -152,11 +152,7 @@ html_url_is_phished(rspamd_mempool_t *pool,
 			 * We have some url at some offset, so we need to check what is
 			 * at the start of the text
 			 */
-			for (const auto p : text_data) {
-				if (!g_ascii_isspace(p)) {
-					return std::nullopt;
-				}
-			}
+			return std::nullopt;
 		}
 
 		text_url = rspamd_mempool_alloc0_type (pool, struct rspamd_url);


More information about the Commits mailing list