[pisa-src] r1603 - in trunk/libpisa: packet.c util.h

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 10 Nov 2009 15:38:08 +0100

Author: biurrun
Date: Tue Nov 10 15:38:07 2009
New Revision: 1603

Log:
Remove pointless indirection macros PISA_MALLOC PISA_FREE.
The macros just add a confusing layer of indirection for no benefit at all.

Modified:
   trunk/libpisa/packet.c
   trunk/libpisa/util.h

Modified: trunk/libpisa/packet.c
==============================================================================
--- trunk/libpisa/packet.c      Tue Nov 10 15:35:14 2009        (r1602)
+++ trunk/libpisa/packet.c      Tue Nov 10 15:38:07 2009        (r1603)
@@ -105,7 +105,7 @@
  */
 pisa_packet *pisa_alloc_msg(void)
 {
-       pisa_packet *pkt = PISA_MALLOC(sizeof(pisa_packet));
+       pisa_packet *pkt = pisa_malloc(sizeof(pisa_packet));
        if (pkt)
                pisa_init_msg(pkt);
 
@@ -119,7 +119,7 @@
  */
 void pisa_free_msg(pisa_packet *pkt)
 {
-       PISA_FREE(pkt);
+       pisa_free(pkt);
 }
 
 /**

Modified: trunk/libpisa/util.h
==============================================================================
--- trunk/libpisa/util.h        Tue Nov 10 15:35:14 2009        (r1602)
+++ trunk/libpisa/util.h        Tue Nov 10 15:38:07 2009        (r1603)
@@ -66,12 +66,6 @@
        } \
 }
 
-/**
- * wrapper macros for memory allocation.
- * for malloc(), realloc() and free().
- */
-#define PISA_MALLOC(size)      pisa_malloc(size)
-#define PISA_FREE(obj)         pisa_free(obj)
 
 #define IPV4_TO_IPV6_MAP(in_addr_from, in6_addr_to)                       \
          {(in6_addr_to)->s6_addr32[0] = 0;                                \

Other related posts:

  • » [pisa-src] r1603 - in trunk/libpisa: packet.c util.h - Diego Biurrun