gnunet-developers
[Top][All Lists]
Advanced

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

[GNUnet-developers] Patch: use xmalloc instead of malloc


From: january
Subject: [GNUnet-developers] Patch: use xmalloc instead of malloc
Date: Wed, 5 Feb 2003 09:18:56 -0800

Index: ./src/util/parseconfig.c
===================================================================
RCS file: /var/cvs/GNUnet/GNUnet/src/util/parseconfig.c,v
retrieving revision 1.6
diff -r1.6 parseconfig.c
29d28
<  * - use xmalloc
36a36
> #include "util/xmalloc.h"
63c63
<     c = malloc(sizeof(struct CFG_SECTIONS));
---
>     c = xmalloc(sizeof(struct CFG_SECTIONS), "CFG_SECTION");
65c65
<     c->sec_names      = malloc(ALLOC_SIZE*sizeof(char*));
---
>     c->sec_names      = xmalloc(ALLOC_SIZE*sizeof(char*), 
> "CFG_SECTION->sec_names");
67c67
<     c->sec_entries    = malloc(ALLOC_SIZE*sizeof(struct CFG_ENTRIES*));
---
>     c->sec_entries    = xmalloc(ALLOC_SIZE*sizeof(struct CFG_ENTRIES*), 
> "CFG_SECTION->sec_entries");
76c76
<     e = malloc(sizeof(struct CFG_ENTRIES));
---
>     e = xmalloc(sizeof(struct CFG_ENTRIES), "CFG_ENTRIES");
78c78
<     e->ent_names     = malloc(ALLOC_SIZE*sizeof(char*));
---
>     e->ent_names     = xmalloc(ALLOC_SIZE*sizeof(char*), 
> "CFG_ENTRIES->ent_names");
80c80
<     e->ent_values    = malloc(ALLOC_SIZE*sizeof(char*));
---
>     e->ent_values    = xmalloc(ALLOC_SIZE*sizeof(char*), 
> "CFG_ENTRIES->ent_values");
82c82
<     e->ent_seen      = malloc(ALLOC_SIZE*sizeof(int*));
---
>     e->ent_seen      = xmalloc(ALLOC_SIZE*sizeof(int*), 
> "CFG_ENTRIES->ent_seen");




Concerned about your privacy? Follow this link to get
FREE encrypted email: https://www.hushmail.com/?l=2 

Big $$$ to be made with the HushMail Affiliate Program: 
https://www.hushmail.com/about.php?subloc=affiliate&l=427




reply via email to

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