* Created IsEmptyStr define to be used rather then using some weird strlen constructs
[citadel.git] / webcit / cookie_conversion.c
index ad8717b07af0947d88e1e01f58e8ad08518758dd..edba4eebfa37cdde5472dcb9bf8cb042798eec57 100644 (file)
@@ -31,10 +31,12 @@ void stuff_to_cookie(char *cookie, int session,
 {
        char buf[SIZ];
        int i;
+       int len;
 
        sprintf(buf, "%d|%s|%s|%s|", session, user, pass, room);
        strcpy(cookie, "");
-       for (i=0; i<strlen(buf); ++i) {
+       len = strlen(buf);
+       for (i=0; i<len; ++i) {
                sprintf(&cookie[i*2], "%02X", buf[i]);
        }
 }