From: Robert Spalek Date: Mon, 24 Apr 2006 09:12:44 +0000 (+0200) Subject: conf2: report a bug when mixing line- and block- syntax improperly X-Git-Tag: holmes-import~645^2~11^2~57 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=171fc5d439fa0c7da4cd3eee59df17efa021cbb2;p=libucw.git conf2: report a bug when mixing line- and block- syntax improperly --- diff --git a/lib/conf2.c b/lib/conf2.c index 5ae93b58..670bf73d 100644 --- a/lib/conf2.c +++ b/lib/conf2.c @@ -880,8 +880,11 @@ interpret_line(byte *name, enum cf_operation op, int number, byte **pars) return msg; if (stack[level].op & OP_1ST) TRY( record_selector(item, stack[level].sec, &stack[level].mask) ); - if (op & OP_OPEN) // the operation will be performed after the closing brace + if (op & OP_OPEN) { // the operation will be performed after the closing brace + if (number) + return "Cannot open a block after a parameter has been passed on a line"; return opening_brace(item, ptr, op); + } if (!item) // ignored item in an unknown section return NULL; op &= OP_MASK;