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 --- drivers/w1/slaves/w1_ds2431.c | 2 +- drivers/w1/slaves/w1_ds2433.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/w1') diff --git a/drivers/w1/slaves/w1_ds2431.c b/drivers/w1/slaves/w1_ds2431.c index 30e6e1d496..e3e929670d 100644 --- a/drivers/w1/slaves/w1_ds2431.c +++ b/drivers/w1/slaves/w1_ds2431.c @@ -272,7 +272,7 @@ static int ds2431_probe(struct w1_device *dev) cdev->priv = dev; cdev->ops = &ds2431_ops; cdev->size = W1_F2D_EEPROM_SIZE; - cdev->name = asprintf(DRIVERNAME"%d", ds2431_count++); + cdev->name = basprintf(DRIVERNAME"%d", ds2431_count++); if (cdev->name == NULL) return -ENOMEM; diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c index a840d9a2f2..a907c6bf3c 100644 --- a/drivers/w1/slaves/w1_ds2433.c +++ b/drivers/w1/slaves/w1_ds2433.c @@ -171,7 +171,7 @@ static int ds2433_cdev_create(struct w1_device *dev, int size, int id) cdev->priv = dev; cdev->ops = &ds2433_ops; cdev->size = size; - cdev->name = asprintf("%s%d", dev->dev.driver->name, id); + cdev->name = basprintf("%s%d", dev->dev.driver->name, id); if (cdev->name == NULL) return -ENOMEM; -- cgit v1.2.3