Cast malloc() in opt_meth_setoption
This commit is contained in:
parent
899a2a046c
commit
544c51c03f
@ -32,7 +32,7 @@ int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps)
|
|||||||
while (opt->name && strcmp(name, opt->name))
|
while (opt->name && strcmp(name, opt->name))
|
||||||
opt++;
|
opt++;
|
||||||
if (!opt->func) {
|
if (!opt->func) {
|
||||||
char* msg = malloc(30+strlen(name));
|
char* msg = (char*)malloc(30+strlen(name));
|
||||||
sprintf(msg, "unsupported option `%.35s'", name);
|
sprintf(msg, "unsupported option `%.35s'", name);
|
||||||
luaL_argerror(L, 2, msg);
|
luaL_argerror(L, 2, msg);
|
||||||
free(msg);
|
free(msg);
|
||||||
|
Reference in New Issue
Block a user