[Pdbg] [PATCH] libpdbg: Remove zalloc macro

Amitay Isaacs amitay at ozlabs.org
Fri Nov 23 15:44:09 AEDT 2018


Reviewed-by: Amitay Isaacs <amitay at ozlabs.org>

On Wed, 2018-11-21 at 13:52 +1100, Alistair Popple wrote:
> Signed-off-by: Alistair Popple <alistair at popple.id.au>
> ---
>  libpdbg/device.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libpdbg/device.c b/libpdbg/device.c
> index f81b1b5..3dc301f 100644
> --- a/libpdbg/device.c
> +++ b/libpdbg/device.c
> @@ -28,7 +28,6 @@
>  #include "debug.h"
>  #include "compiler.h"
>  
> -#define zalloc(size) calloc(1, size)
>  #define prerror printf
>  #define is_rodata(p) false
>  
> @@ -219,7 +218,7 @@ static char *dt_get_path(const struct pdbg_target
> *node)
>  		if (n->parent || n == node)
>  			len++;
>  	}
> -	path = zalloc(len + 1);
> +	path = calloc(1, len + 1);
>  	assert(path);
>  	p = path + len;
>  	for (n = node; n; n = n->parent) {
> -- 
> 2.11.0
> 

Amitay.
-- 

We make a living by what we get, but we make a life by what we give. - Norman
MacEwan



More information about the Pdbg mailing list