path: root/commands/defaultenv.c
diff options
authorSascha Hauer <>2016-04-11 16:52:10 +0200
committerSascha Hauer <>2016-04-15 12:21:45 +0200
commit947fb5adf8af450507c978abf1c7ec9f051e5842 (patch)
treeaf790669292308b56baf188611ac430012037cba /commands/defaultenv.c
parent48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff)
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 <>
Diffstat (limited to 'commands/defaultenv.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/defaultenv.c b/commands/defaultenv.c
index bae2d78..47bdf26 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);