aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-02 19:22:07 +0100
committerKim Alvefur <zash@zash.se>2017-03-02 19:22:07 +0100
commit2246bd21b50f12862cb99c92edfaa79c97f4d47b (patch)
tree428e25dc4265a06ce1d28d9ab4d6f075d5f9c432 /util-src
parent962ba796132d9dd59f7db308bbb0f633caf6bc0b (diff)
downloadprosody-2246bd21b50f12862cb99c92edfaa79c97f4d47b.tar.gz
prosody-2246bd21b50f12862cb99c92edfaa79c97f4d47b.zip
util.ringbuffer: Change types of length related variables to size_t [-Wsign-compare]
Diffstat (limited to 'util-src')
-rw-r--r--util-src/ringbuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-src/ringbuffer.c b/util-src/ringbuffer.c
index 831b1fe2..2a13903c 100644
--- a/util-src/ringbuffer.c
+++ b/util-src/ringbuffer.c
@@ -31,7 +31,7 @@ void modpos(ringbuffer *b) {
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_find(lua_State *L) {
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) {