Software /
code /
prosody
Diff
util-src/ringbuffer.c @ 7941:8067828e7e40
util.ringbuffer: Change types of length related variables to size_t [-Wsign-compare]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 02 Mar 2017 19:22:07 +0100 |
parent | 7889:b8d694646597 |
child | 7969:1c6a07606309 |
line wrap: on
line diff
--- a/util-src/ringbuffer.c Thu Mar 02 15:21:07 2017 +0100 +++ b/util-src/ringbuffer.c Thu Mar 02 19:22:07 2017 +0100 @@ -31,7 +31,7 @@ b->wpos = b->wpos % b->alen; } -int find(ringbuffer *b, const char *s, int l) { +int find(ringbuffer *b, const char *s, size_t l) { size_t i, j; int m; @@ -74,7 +74,7 @@ int rb_read(lua_State *L) { ringbuffer *b = luaL_checkudata(L, 1, "ringbuffer_mt"); - int r = luaL_checkinteger(L, 2); + size_t r = luaL_checkinteger(L, 2); int peek = lua_toboolean(L, 3); if(r > b->blen) {