From c7fccc84bf59bed95bdf13207c40f7a1d1711d24 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 5 Mar 2011 10:29:10 +0000 Subject: use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors. --- source/blender/imbuf/intern/targa.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/imbuf/intern/targa.c') diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 4f1f756a861..f334409133f 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -196,8 +196,8 @@ static int dumptarga(struct ImBuf * ibuf, FILE * file) int size; uchar *rect; - if (ibuf == 0) return (0); - if (ibuf->rect == 0) return (0); + if (ibuf == NULL) return (0); + if (ibuf->rect == NULL) return (0); size = ibuf->x * ibuf->y; rect = (uchar *) ibuf->rect; @@ -366,8 +366,8 @@ static void decodetarga(struct ImBuf *ibuf, unsigned char *mem, size_t mem_size, unsigned int *rect; uchar * cp = (uchar *) &col; - if (ibuf == 0) return; - if (ibuf->rect == 0) return; + if (ibuf == NULL) return; + if (ibuf->rect == NULL) return; size = ibuf->x * ibuf->y; rect = ibuf->rect; @@ -477,8 +477,8 @@ static void ldtarga(struct ImBuf * ibuf,unsigned char * mem, size_t mem_size, in unsigned int *rect; uchar * cp = (uchar *) &col; - if (ibuf == 0) return; - if (ibuf->rect == 0) return; + if (ibuf == NULL) return; + if (ibuf->rect == NULL) return; size = ibuf->x * ibuf->y; rect = ibuf->rect; @@ -535,12 +535,12 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags) unsigned int *rect, *cmap= NULL, mincol= 0, maxcol= 0; uchar * cp = (uchar *) &col; - if (checktarga(&tga,mem) == 0) return(0); + if (checktarga(&tga,mem) == 0) return(NULL); if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,tga.pixsize, 0); else ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,(tga.pixsize + 0x7) & ~0x7, IB_rect); - if (ibuf == 0) return(0); + if (ibuf == NULL) return(NULL); ibuf->ftype = TGA; ibuf->profile = IB_PROFILE_SRGB; mem = mem + 18 + tga.numid; -- cgit v1.2.3