diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-28 20:02:03 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-02-01 19:55:42 -0800 |
commit | 431c1ed9e1b445e20a9c0413c3faeee566755b4d (patch) | |
tree | 12880cc4c963e7980e86ea30305b56a947fd24b0 /xlsfonts.c | |
parent | d1dbba01539a89e1d56ca261e18ae2e31f075cfe (diff) |
inline Realloc() at the one place it's called
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'xlsfonts.c')
-rw-r--r-- | xlsfonts.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -206,8 +206,9 @@ void get_list(char *pattern) return; } - font_list = (FontList *)Realloc((char *)font_list, - (font_cnt + available) * sizeof(FontList)); + font_list = realloc(font_list, (font_cnt + available) * sizeof(FontList)); + if (font_list == NULL) + Fatal_Error("Out of memory!"); for (i=0; i<available; i++) { font_list[font_cnt].name = fonts[i]; if (long_list == L_MEDIUM) |