diff options
author | Thomas Harning Jr <harningt@gmail.com> | 2011-01-15 19:51:21 -0500 |
---|---|---|
committer | Thomas Harning Jr <harningt@gmail.com> | 2011-01-15 19:51:21 -0500 |
commit | 1153affe43bbc7f929213e0a5d6f8b5189cc45bd (patch) | |
tree | 1e63a88fdebccabf3529fa9c697c3f43b067c673 /src/event_buffer.c | |
parent | 24cac1c1bcf4b0dc3188f72934d2881692829e61 (diff) | |
parent | d6cfe3ef1bc7d3c489abe394830211906e650d2c (diff) | |
download | luaevent-prosody-1153affe43bbc7f929213e0a5d6f8b5189cc45bd.tar.gz luaevent-prosody-1153affe43bbc7f929213e0a5d6f8b5189cc45bd.zip |
Merge branch 'prosody-tree'
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); |