Cast malloc() in opt_meth_setoption

This commit is contained in:
QuanTech0 2020-04-27 23:55:52 -04:00 committed by jacob1
parent 899a2a046c
commit 544c51c03f

View File

@ -32,7 +32,7 @@ int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps)
while (opt->name && strcmp(name, opt->name))
opt++;
if (!opt->func) {
char* msg = malloc(30+strlen(name));
char* msg = (char*)malloc(30+strlen(name));
sprintf(msg, "unsupported option `%.35s'", name);
luaL_argerror(L, 2, msg);
free(msg);