* strlen holy war: loops. in loops it's very evil. the easy ones go away now.
[citadel.git] / citadel / modules / calendar / serv_calendar.c
index 619194cf0e28c676339f559074bb0045a9c0591e..ac8d6e9c5431c0ede002bf8ac0885bb5eaefa5fc 100644 (file)
@@ -1274,7 +1274,7 @@ void ical_freebusy(char *who) {
                strcat(buf, "@");
                strcat(buf, config.c_fqdn);
        }
-       for (i=0; i<strlen(buf); ++i) {
+       for (i=0; !IsEmptyStr(&buf[i]); ++i) {
                if (buf[i]==' ') buf[i] = '_';
        }
        icalcomponent_add_property(fb, icalproperty_new_organizer(buf));