Trust the compiler to do short-circuit evaluation.
[citadel.git] / webcit / event.c
index 5bb3efb4fd87a5623d6bc4468e1617e96a490db7..f073f47b58492719f8bfce4553c334cd3c53fde3 100644 (file)
@@ -337,15 +337,17 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
        }
 
        wprintf("<INPUT TYPE=\"radio\" NAME=\"transp\" VALUE=\"transparent\"");
-       if (v != NULL) if (icalvalue_get_transp(v) == ICAL_TRANSP_TRANSPARENT)
+       if ((v != NULL) && (icalvalue_get_transp(v) == ICAL_TRANSP_TRANSPARENT)) {
                wprintf(" CHECKED");
+       }
        wprintf(">");
        wprintf(_("Free"));
        wprintf("&nbsp;&nbsp;");
 
        wprintf("<INPUT TYPE=\"radio\" NAME=\"transp\" VALUE=\"opaque\"");
-       if (v != NULL) if (icalvalue_get_transp(v) == ICAL_TRANSP_OPAQUE)
+       if ((v != NULL) && (icalvalue_get_transp(v) == ICAL_TRANSP_OPAQUE)) {
                wprintf(" CHECKED");
+       }
        wprintf(">");
        wprintf(_("Busy"));