[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] Remove include xalloc.h from libpoke/pvm.c
From: |
Tim Rühsen |
Subject: |
Re: [PATCH 3/3] Remove include xalloc.h from libpoke/pvm.c |
Date: |
Sun, 17 May 2020 12:39:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
Pushed.
On 16.05.20 18:51, Jose E. Marchesi wrote:
>
> Hi Tim.
>
> OK for master.
> Thanks for doing this! :)
>
>
> 2020-05-16 Tim Rühsen <address@hidden>
>
> * libpoke/pvm.c: Remove include xalloc.h.
> (pvm_init): Use calloc instead of xzalloc.
> ---
> ChangeLog | 5 +++++
> libpoke/pvm.c | 5 +++--
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/libpoke/pvm.c b/libpoke/pvm.c
> index b82930de..df152f38 100644
> --- a/libpoke/pvm.c
> +++ b/libpoke/pvm.c
> @@ -18,7 +18,6 @@
>
> #include <config.h>
>
> -#include <xalloc.h>
> #include <string.h>
> #include <assert.h>
> #include <signal.h>
> @@ -74,7 +73,9 @@ struct pvm
> pvm
> pvm_init (void)
> {
> - pvm apvm = xzalloc (sizeof (struct pvm));
> + pvm apvm = calloc (1, sizeof (struct pvm));
> + if (!apvm)
> + return NULL;
>
> /* Initialize the memory allocation subsystem. */
> pvm_alloc_initialize ();
> --
> 2.26.2
>
signature.asc
Description: OpenPGP digital signature