aboutsummaryrefslogtreecommitdiffstats
path: root/src/listbox.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2014-07-18 08:47:23 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2014-07-18 08:47:23 +0200
commite9d4d3c505114114366cc0102ee92ce2e0d779dc (patch)
treeba4125df88d405f172c76f6eab00d6299d408bc1 /src/listbox.c
parent58f6ac62aaf38b0122e304a09c2a589743a7e215 (diff)
downloadcalcurse-e9d4d3c505114114366cc0102ee92ce2e0d779dc.tar.gz
calcurse-e9d4d3c505114114366cc0102ee92ce2e0d779dc.zip
Do not use malloc() or xmalloc()
Use mem_malloc() instead which automatically picks the right implementation depending on whether memory debugging is enabled or not. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/listbox.c')
-rw-r--r--src/listbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/listbox.c b/src/listbox.c
index c886dce..a109b7f 100644
--- a/src/listbox.c
+++ b/src/listbox.c
@@ -97,8 +97,8 @@ void listbox_load_items(struct listbox *lb, int item_count)
free(lb->type);
free(lb->ch);
- lb->type = xmalloc(item_count * sizeof(unsigned));
- lb->ch = xmalloc((item_count + 1) * sizeof(unsigned));
+ lb->type = mem_malloc(item_count * sizeof(unsigned));
+ lb->ch = mem_malloc((item_count + 1) * sizeof(unsigned));
for (i = 0, ch = 0; i < item_count; i++) {
lb->type[i] = lb->fn_type(i, lb->cb_data);
lb->ch[i] = ch;