poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] Remove include xalloc.h from libpoke/pvm.c


From: Tim Rühsen
Subject: [PATCH 3/3] Remove include xalloc.h from libpoke/pvm.c
Date: Sat, 16 May 2020 18:23:39 +0200

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]