Skip to content
Snippets Groups Projects
Commit 8237a852 authored by edgrif's avatar edgrif
Browse files

change mallocs to g_malloc0

parent 91424fbd
No related branches found
Tags RELEASE_0-1-77
No related merge requests found
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
* Description: * Description:
* Exported functions: See XXXXXXXXXXXXX.h * Exported functions: See XXXXXXXXXXXXX.h
* HISTORY: * HISTORY:
* Last edited: Jun 30 13:58 2004 (edgrif) * Last edited: Jul 16 09:50 2004 (edgrif)
* Created: Wed Jun 30 13:38:10 2004 (edgrif) * Created: Wed Jun 30 13:38:10 2004 (edgrif)
* CVS info: $Id: seqregion.c,v 1.5 2004-07-01 09:26:24 edgrif Exp $ * CVS info: $Id: seqregion.c,v 1.6 2004-07-16 08:51:29 edgrif Exp $
*------------------------------------------------------------------- *-------------------------------------------------------------------
*/ */
...@@ -63,7 +63,7 @@ Coord srCoord(ZMapRegion *zMapRegion, InvarCoord coord) ...@@ -63,7 +63,7 @@ Coord srCoord(ZMapRegion *zMapRegion, InvarCoord coord)
/* Creates a new, empty ZMapRegion structure. */ /* Creates a new, empty ZMapRegion structure. */
ZMapRegion *srCreate(void) ZMapRegion *srCreate(void)
{ {
ZMapRegion *zMapRegion = (ZMapRegion*)g_malloc(sizeof(ZMapRegion)) ; ZMapRegion *zMapRegion = (ZMapRegion*)g_malloc0(sizeof(ZMapRegion)) ;
zMapRegion->area1 = zMapRegion->area2 = 0 ; zMapRegion->area1 = zMapRegion->area2 = 0 ;
zMapRegion->methods = NULL ; zMapRegion->methods = NULL ;
......
/* Last edited: Jul 5 14:37 2004 (rnc) */ /* Last edited: Jul 16 09:50 2004 (edgrif) */
/* file: stringbucket.c /* file: stringbucket.c
* Author: Simon Kelley (srk@sanger.ac.uk) * Author: Simon Kelley (srk@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2003 * Copyright (c) Sanger Institute, 2003
...@@ -42,7 +42,7 @@ struct sbucketchain { ...@@ -42,7 +42,7 @@ struct sbucketchain {
StringBucket *sbCreate(void) StringBucket *sbCreate(void)
{ {
StringBucket *b = g_malloc(sizeof(struct sbucket)) ; StringBucket *b = g_malloc0(sizeof(struct sbucket)) ;
b->chain = NULL; b->chain = NULL;
...@@ -74,7 +74,7 @@ char *str2p(char *string, StringBucket *b) ...@@ -74,7 +74,7 @@ char *str2p(char *string, StringBucket *b)
if (!c) if (!c)
{ {
c = g_malloc(sizeof(struct sbucketchain) + strlen(string) + 1) ; c = g_malloc0(sizeof(struct sbucketchain) + strlen(string) + 1) ;
c->next = b->chain; c->next = b->chain;
b->chain = c; b->chain = c;
......
/* Last edited: Jul 6 10:20 2004 (rnc) */ /* Last edited: Jul 16 09:51 2004 (edgrif) */
/* file: zmapbccol.c /* file: zmapbccol.c
* Author: Simon Kelley (srk@sanger.ac.uk) * Author: Simon Kelley (srk@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2003 * Copyright (c) Sanger Institute, 2003
...@@ -154,7 +154,7 @@ void nbcInit(ZMapPane pane, ZMapColumn *col) ...@@ -154,7 +154,7 @@ void nbcInit(ZMapPane pane, ZMapColumn *col)
{ {
/* this whole bit needs to be rewritten, so it's OK to comment it out, I think /* this whole bit needs to be rewritten, so it's OK to comment it out, I think
srMeth *meth = srMethodFromID(zMapPaneGetZMapRegion(pane), col->meth); srMeth *meth = srMethodFromID(zMapPaneGetZMapRegion(pane), col->meth);
nbcPrivate *bc = (nbcPrivate*)malloc(sizeof(nbcPrivate)); nbcPrivate *bc = (nbcPrivate*)g_malloc0(sizeof(nbcPrivate));
// nbcPrivate *bc = handleAlloc(nbcFinalise, zMapWindowGetHandle(pane->window), // nbcPrivate *bc = handleAlloc(nbcFinalise, zMapWindowGetHandle(pane->window),
// sizeof(nbcPrivate)); // sizeof(nbcPrivate));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment