]> mj.ucw.cz Git - libucw.git/commitdiff
conf2: report a bug when mixing line- and block- syntax improperly
authorRobert Spalek <robert@ucw.cz>
Mon, 24 Apr 2006 09:12:44 +0000 (11:12 +0200)
committerRobert Spalek <robert@ucw.cz>
Mon, 24 Apr 2006 09:12:44 +0000 (11:12 +0200)
lib/conf2.c

index 5ae93b589702d9557019c752b57295031741d038..670bf73dfbd0ba5cfbfddb1b422bc576f9b11462 100644 (file)
@@ -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;