Remove long_u: do_outofmem_msg().

Remove long_u occurrences due to do_outofmem_msg() function.
Refactor size parameter from long_u into size_t.
This commit is contained in:
Eliseo Martínez 2014-05-24 01:17:42 +02:00
parent 9e95c8aa33
commit 95c3300ca6
3 changed files with 4 additions and 4 deletions

View File

@ -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 */

View File

@ -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

View File

@ -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. */