* Created IsEmptyStr define to be used rather then using some weird strlen constructs
[citadel.git] / webcit / vcard_edit.c
index a0d143636a1062bbaf2f25f3cad4962f5a049c31..24a0c14e33b32ad66a8c96ff8a80859d9d2ce2a4 100644 (file)
@@ -363,7 +363,7 @@ void submit_vcard(void) {
        char buf[SIZ];
        int i;
 
-       if (strlen(bstr("ok_button")) == 0) { 
+       if (IsEmptyStr(bstr("ok_button"))) { 
                readloop("readnew");
                return;
        }
@@ -419,7 +419,7 @@ void submit_vcard(void) {
 
        for (i=0; i<num_tokens(bstr("other_inetemail"), '\n'); ++i) {
                extract_token(buf, bstr("other_inetemail"), i, '\n', sizeof buf);
-               if (strlen(buf) > 0) {
+               if (!IsEmptyStr(buf)) {
                        vcard_add_prop(v, "email;internet", buf);
                }
        }