]> diplodocus.org Git - nmh/commitdiff
sbr/mf.c: Simplify isat(); it's /^ at /i.
authorRalph Corderoy <ralph@inputplus.co.uk>
Tue, 9 May 2017 21:48:11 +0000 (22:48 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Tue, 9 May 2017 21:48:11 +0000 (22:48 +0100)
This one's for all those RFC 733 emails out there.
You know who you are.

sbr/mf.c

index 4d04abb682d324d21a884ba64704736a2841602a..33eed0d1e578ef4e4298ac83f06fc38c5cbbe275 100644 (file)
--- a/sbr/mf.c
+++ b/sbr/mf.c
@@ -24,8 +24,10 @@ static int my_lex (char *);
 static int
 isat (const char *p)
 {
 static int
 isat (const char *p)
 {
-    return has_prefix(p, " AT ") || has_prefix(p, " At ") ||
-        has_prefix(p, " aT ") || has_prefix(p, " at ");
+    return *p == ' ' &&
+        (p[1] == 'a' || p[1] == 'A') &&
+        (p[2] == 't' || p[2] == 'T') &&
+        p[3] == ' ';
 }
 
 
 }