From 947fb5adf8af450507c978abf1c7ec9f051e5842 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 11 Apr 2016 16:52:10 +0200 Subject: string: Fix (v)asprintf prototypes Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer --- commands/defaultenv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands/defaultenv.c') diff --git a/commands/defaultenv.c b/commands/defaultenv.c index bae2d78f47..47bdf26d14 100644 --- a/commands/defaultenv.c +++ b/commands/defaultenv.c @@ -60,8 +60,8 @@ static int do_defaultenv(int argc, char *argv[]) if (ret) return ret; - from = asprintf("/.defaultenv/%s", restorepath); - to = asprintf("%s/%s", dirname, restorepath); + from = basprintf("/.defaultenv/%s", restorepath); + to = basprintf("%s/%s", dirname, restorepath); printf("Restoring %s from default environment\n", restorepath); -- cgit v1.2.3