summaryrefslogtreecommitdiff
path: root/kicad/pl-render.c
diff options
context:
space:
mode:
Diffstat (limited to 'kicad/pl-render.c')
-rw-r--r--kicad/pl-render.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kicad/pl-render.c b/kicad/pl-render.c
index 914eee7..c56519c 100644
--- a/kicad/pl-render.c
+++ b/kicad/pl-render.c
@@ -10,7 +10,6 @@
* (at your option) any later version.
*/
-#define _GNU_SOURCE /* for asprintf */
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -88,7 +87,7 @@ static char *expand(const struct pl_ctx *pl, const char *s,
n = 0;
for (sch = sheets; sch; sch = sch->next)
n++;
- if (asprintf(&x, "%u", n)) {}
+ alloc_printf(&x, "%u", n);
break;
case 'P':
x = "%P"; // sheet path
@@ -101,7 +100,7 @@ static char *expand(const struct pl_ctx *pl, const char *s,
for (sch = sheets; sch != sheet;
sch = sch->next)
n++;
- if (asprintf(&x, "%u", n)) {}
+ alloc_printf(&x, "%u", n);
break;
case 'T':
x = (char *) sheet->title;