@@ -171,15 +171,10 @@ lc_flags_t flags, void *extra) { if (flags == LC_FLAGS_SECTIONEND) { return(LC_CBRET_OKAY); } - if (flags != LC_FLAGS_SECTIONSTART) { - lc_seterrstr("IfModule can only be used as a \\ - section."); - return(LC_CBRET_ERROR); - } if (arguments == NULL) { lc_seterrstr("You must specify an argument to \\ IfModule."); return(LC_CBRET_ERROR); } @@ -192,13 +187,13 @@ return(LC_CBRET_OKAY); } int main(int argc, char **argv) { - int lc_rc_ret = 0, lc_p_ret; + int lc_rc_ret, lc_p_ret; - lc_rc_ret = lc_register_callback("*.IfModule", 0, LC_VAR_NONE, + lc_rc_ret = lc_register_callback("*.IfModule", 0, LC_VAR_SECTION, callback_ifmodule, NULL); if (lc_rc_ret != 0) { fprintf(stderr, "Error registering callback.\\n"); return(EXIT_FAILURE);