From d8f618fee89be7c25e9cc232a358d2d2b1ed53ac Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Tue, 9 May 2017 22:48:11 +0100 Subject: [PATCH] sbr/mf.c: Simplify isat(); it's /^ at /i. This one's for all those RFC 733 emails out there. You know who you are. --- sbr/mf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbr/mf.c b/sbr/mf.c index 4d04abb6..33eed0d1 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -24,8 +24,10 @@ static int my_lex (char *); 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] == ' '; } -- 2.56.0