poke-devel
[Top][All Lists]
Advanced

[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: Jose E. Marchesi
Subject: Re: [PATCH 3/3] Remove include xalloc.h from libpoke/pvm.c
Date: Sat, 16 May 2020 18:51:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]