diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-04-11 16:52:10 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-04-15 12:21:45 +0200 |
commit | 947fb5adf8af450507c978abf1c7ec9f051e5842 (patch) | |
tree | af790669292308b56baf188611ac430012037cba /net/dhcp.c | |
parent | 48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff) | |
download | barebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.gz barebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.xz |
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'net/dhcp.c')
-rw-r--r-- | net/dhcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dhcp.c b/net/dhcp.c index 4433b442db..792ece491b 100644 --- a/net/dhcp.c +++ b/net/dhcp.c @@ -83,7 +83,7 @@ static char dhcp_tftpname[256]; static const char* dhcp_get_barebox_global(const char * var) { - char * var_global = asprintf("global.dhcp.%s", var); + char * var_global = basprintf("global.dhcp.%s", var); const char *val; if (!var_global) @@ -96,7 +96,7 @@ static const char* dhcp_get_barebox_global(const char * var) static int dhcp_set_barebox_global(const char * var, char *val) { - char * var_global = asprintf("global.dhcp.%s", var); + char * var_global = basprintf("global.dhcp.%s", var); int ret; if (!var_global) @@ -717,7 +717,7 @@ out: #ifdef CONFIG_GLOBALVAR static void dhcp_global_add(const char *var) { - char *var_global = asprintf("dhcp.%s", var); + char *var_global = basprintf("dhcp.%s", var); if (!var_global) return; |