static int
lookup_args(lua_State *L, struct uci_ptr *ptr, char **buf)
{
- char *s;
+ char *s = NULL;
int n;
n = lua_gettop(L);
goto error;
switch (n) {
+ case 4:
case 3:
ptr->option = luaL_checkstring(L, 3);
/* fall through */
goto error;
break;
default:
+ luaL_error(L, "invalid argument count");
goto error;
}
{
struct uci_element *e = NULL;
struct uci_ptr ptr;
- char *s;
+ char *s = NULL;
int err = UCI_ERR_NOTFOUND;
if (lookup_args(L, &ptr, &s))