err = UCI_ERR_INVAL;
goto error;
}
+ if (!err)
+ return 1;
+
error:
if (s)
free(s);
ctx = find_context(L, &offset);
nargs = lua_gettop(L);
- if ((cmd != CMD_REVERT) && (nargs > 1))
+ if ((cmd != CMD_REVERT) && (nargs - offset > 1))
goto err;
if (lookup_args(L, ctx, offset, &ptr, &s))