Removed IsEmptyStr from some loops as its quicker this way (probably).
authorDave West <davew@uncensored.citadel.org>
Thu, 23 Aug 2007 10:23:16 +0000 (10:23 +0000)
committerDave West <davew@uncensored.citadel.org>
Thu, 23 Aug 2007 10:23:16 +0000 (10:23 +0000)
citadel/modules/smtp/serv_smtp.c

index b7da263ec3c1d5992beabebe0cbdff2d2b85f6b7..ccbe1a78ef3a9c7795d8fa0417958626d3168f34 100644 (file)
@@ -958,7 +958,7 @@ void smtp_try(const char *key, const char *addr, int *status,
                if (!strncasecmp(buf, "From:", 5)) {
                        safestrncpy(mailfrom, &buf[5], sizeof mailfrom);
                        striplt(mailfrom);
-                       for (i=0; !IsEmptyStr(&mailfrom[i]); ++i) {
+                       for (i=0; mailfrom[i]; ++i) {
                                if (!isprint(mailfrom[i])) {
                                        strcpy(&mailfrom[i], &mailfrom[i+1]);
                                        i=0;
@@ -968,7 +968,7 @@ void smtp_try(const char *key, const char *addr, int *status,
                        /* Strip out parenthesized names */
                        lp = (-1);
                        rp = (-1);
-                       for (i=0; !IsEmptyStr(&mailfrom[i]); ++i) {
+                       for (i=0; mailfrom[i]; ++i) {
                                if (mailfrom[i] == '(') lp = i;
                                if (mailfrom[i] == ')') rp = i;
                        }
@@ -979,7 +979,7 @@ void smtp_try(const char *key, const char *addr, int *status,
                        /* Prefer brokketized names */
                        lp = (-1);
                        rp = (-1);
-                       for (i=0; !IsEmptyStr(&mailfrom[i]); ++i) {
+                       for (i=0; mailfrom[i]; ++i) {
                                if (mailfrom[i] == '<') lp = i;
                                if (mailfrom[i] == '>') rp = i;
                        }