diff mbox series

libpdbg: Remove zalloc macro

Message ID 20181121025210.30717-1-alistair@popple.id.au
State Accepted
Headers show
Series libpdbg: Remove zalloc macro | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master

Commit Message

Alistair Popple Nov. 21, 2018, 2:52 a.m. UTC
Signed-off-by: Alistair Popple <alistair@popple.id.au>
---
 libpdbg/device.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Amitay Isaacs Nov. 23, 2018, 4:44 a.m. UTC | #1
Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>

On Wed, 2018-11-21 at 13:52 +1100, Alistair Popple wrote:
> Signed-off-by: Alistair Popple <alistair@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.
diff mbox series

Patch

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) {