diff options
Diffstat (limited to 'ncurses/tinfo/doalloc.c')
| -rw-r--r-- | ncurses/tinfo/doalloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ncurses/tinfo/doalloc.c b/ncurses/tinfo/doalloc.c index e3b1a2e96c1b..dac28f60f4cd 100644 --- a/ncurses/tinfo/doalloc.c +++ b/ncurses/tinfo/doalloc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2024 Thomas E. Dickey * * Copyright 1998-2002,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #include <curses.priv.h> -MODULE_ID("$Id: doalloc.c,v 1.14 2021/04/24 23:43:39 tom Exp $") +MODULE_ID("$Id: doalloc.c,v 1.15 2024/12/07 20:05:08 tom Exp $") void * _nc_doalloc(void *oldp, size_t amount) @@ -51,7 +51,7 @@ _nc_doalloc(void *oldp, size_t amount) if (amount == 0) { free(oldp); newp = NULL; - } else if ((newp = realloc(oldp, amount)) == 0) { + } else if ((newp = realloc(oldp, amount)) == NULL) { free(oldp); errno = ENOMEM; /* just in case 'free' reset */ } |
