]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
simplify code using isspace()
authorBaptiste Daroussin <bapt@FreeBSD.org>
Mon, 24 Oct 2022 12:56:17 +0000 (14:56 +0200)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Mon, 24 Oct 2022 12:56:17 +0000 (14:56 +0200)
src/find_email_adr.c

index b77e425d5d174cead16b8c188d642dde262f6e25..11d90bc76e934124e4761c1b517bcc6e58f45611 100644 (file)
@@ -42,6 +42,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <ctype.h>
 
 #include "find_email_adr.h"
 #include "xmalloc.h"
@@ -221,10 +222,7 @@ oncemore:
                        }
                }
 
-               while(cur && ((' ' == *cur) ||
-                           ('\t' == *cur) ||
-                           ('\r' == *cur) ||
-                           ('\n' == *cur))) {
+               while(cur && isspace(*cur)) {
                        cur += 1;
                }
                if ('\0' == *cur) {