summaryrefslogtreecommitdiff
path: root/kicad/ext.c
diff options
context:
space:
mode:
Diffstat (limited to 'kicad/ext.c')
-rw-r--r--kicad/ext.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kicad/ext.c b/kicad/ext.c
index 961f231..15d4e75 100644
--- a/kicad/ext.c
+++ b/kicad/ext.c
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <string.h>
+#include "misc/util.h"
#include "misc/diag.h"
#include "kicad/ext.h"
@@ -68,10 +69,8 @@ void classify_files(struct file_names *fn, char *const *args,
break;
case ext_lib:
fn->n_libs++;
- fn->libs = realloc(fn->libs,
- fn->n_libs * sizeof(const char *));
- if (!fn->libs)
- diag_pfatal("realloc");
+ fn->libs = realloc_type_n(fn->libs, const char *,
+ fn->n_libs);
fn->libs[fn->n_libs - 1] = args[i];
break;
case ext_pl: