diff options
Diffstat (limited to 'src/event_buffer.c')
-rw-r--r-- | src/event_buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/event_buffer.c b/src/event_buffer.c index 62dc0e3..ea66a94 100644 --- a/src/event_buffer.c +++ b/src/event_buffer.c @@ -2,7 +2,6 @@ * Licensed as LGPL - See doc/COPYING for details */ #include "event_buffer.h" -#include "luaevent.h" #include <lauxlib.h> #include <malloc.h> @@ -201,6 +200,7 @@ static int event_buffer_write(lua_State* L) { } else if(lua_isuserdata(L, 2)) { ret = evbuffer_write(buf->buffer, getSocketFd(L, 2)); } else { + ret = 0; /* Shush uninitialized warning */ luaL_argerror(L, 2, "Unexpected data type. Expects: integer/lightuserdata/socket"); } lua_pushinteger(L, ret); @@ -222,6 +222,7 @@ static int event_buffer_read(lua_State* L) { } else if(lua_isuserdata(L, 2)) { ret = evbuffer_read(buf->buffer, getSocketFd(L, 2), len); } else { + ret = 0; /* Shush uninitialized warning */ luaL_argerror(L, 2, "Unexpected data type. Expects: integer/lightuserdata/socket"); } lua_pushinteger(L, ret); |