]> code.citadel.org Git - citadel.git/commitdiff
Fixed gratuitous use of strlen() in imap_strout()
authorArt Cancro <ajc@citadel.org>
Wed, 11 Apr 2007 19:20:32 +0000 (19:20 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 11 Apr 2007 19:20:32 +0000 (19:20 +0000)
citadel/imap_tools.c

index 72b8325ea5ee4162cd73b4dcfa7593cc7bdb9f6d..c12755015dcd17fdacef7350c52c7cb803423903 100644 (file)
@@ -376,12 +376,15 @@ void imap_strout(char *buf)
 {
        int i;
        int is_literal = 0;
+       int len;
 
        if (buf == NULL) {      /* yeah, we handle this */
                cprintf("NIL");
                return;
        }
-       for (i = 0; i < strlen(buf); ++i) {
+
+       len = strlen(buf);
+       for (i = 0; i < len; ++i) {
                if ((buf[i] == '\"') || (buf[i] == '\\'))
                        is_literal = 1;
        }