diff --git a/src/nvim/memory.c b/src/nvim/memory.c index 9bfb12e0ee..b6990890a6 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -84,7 +84,7 @@ void *verbose_try_malloc(size_t size) { void *ret = try_malloc(size); if (!ret) { - do_outofmem_msg((long_u)size); + do_outofmem_msg(size); } return ret; } @@ -214,7 +214,7 @@ void *xmemdup(const void *data, size_t len) * Avoid repeating the error message many times (they take 1 second each). * Did_outofmem_msg is reset when a character is read. */ -void do_outofmem_msg(long_u size) +void do_outofmem_msg(size_t size) { if (!did_outofmem_msg) { /* Don't hide this message */ diff --git a/src/nvim/memory.h b/src/nvim/memory.h index ac7b1ebd6a..2723a7ba80 100644 --- a/src/nvim/memory.h +++ b/src/nvim/memory.h @@ -134,7 +134,7 @@ char *xstpncpy(char *restrict dst, const char *restrict src, size_t maxlen); void *xmemdup(const void *data, size_t len) FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_RET; -void do_outofmem_msg(long_u size); +void do_outofmem_msg(size_t size); void free_all_mem(void); #endif diff --git a/src/nvim/screen.c b/src/nvim/screen.c index af3f5c999f..f4616d3b8e 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -6288,7 +6288,7 @@ retry: || outofmem) { if (ScreenLines != NULL || !done_outofmem_msg) { /* guess the size */ - do_outofmem_msg((long_u)((Rows + 1) * Columns)); + do_outofmem_msg((Rows + 1) * Columns); /* Remember we did this to avoid getting outofmem messages over * and over again. */