]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/vandelay/serv_vandelay.c
* strlen holy war: loops. in loops it's very evil. the easy ones go away now.
[citadel.git] / citadel / modules / vandelay / serv_vandelay.c
index b1c3630c0cdf9a3facc2a41d4c6db96e536e01ea..a77eb49208288ee52fc6af46eb4cbe3c5bad6e5b 100644 (file)
@@ -199,7 +199,7 @@ void artv_export_visits(void) {
                cprintf("%ld\n", vbuf.v_roomgen);
                cprintf("%ld\n", vbuf.v_usernum);
 
-               if (strlen(vbuf.v_seen) > 0) {
+               if (!IsEmptyStr(vbuf.v_seen)) {
                        cprintf("%s\n", vbuf.v_seen);
                }
                else {
@@ -587,7 +587,7 @@ void artv_import_visit(void) {
 
        client_getln(buf, sizeof buf);
        vbuf.v_lastseen = atol(buf);
-       for (i=0; i<strlen(buf); ++i) if (!isdigit(buf[i])) is_textual_seen = 1;
+       for (i=0; !IsEmptyStr(&buf[i]); ++i) if (!isdigit(buf[i])) is_textual_seen = 1;
        if (is_textual_seen)    strcpy(vbuf.v_seen, buf);
 
        client_getln(vbuf.v_answered, sizeof vbuf.v_answered);