replace 0 with NULL when used as a pointer
authorCampbell Barton <ideasman42@gmail.com>
Thu, 3 Mar 2011 17:58:06 +0000 (17:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 3 Mar 2011 17:58:06 +0000 (17:58 +0000)
33 files changed:
intern/guardedalloc/intern/mallocn.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/world.c
source/blender/blenlib/intern/storage.c
source/blender/blenloader/intern/readfile.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_material.c
source/blender/ikplugin/intern/iksolver_plugin.c
source/blender/imbuf/intern/allocimbuf.c
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/bmp.c
source/blender/imbuf/intern/divers.c
source/blender/imbuf/intern/iris.c
source/blender/imbuf/intern/jpeg.c
source/blender/imbuf/intern/png.c
source/blender/imbuf/intern/readimage.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_ui.c
source/blender/makesrna/intern/rna_wm.c

index e56f3c3d598e87ea89bf9d98c900baf6e2f0c2ae..f1c9f9e636309eb98299a637a7c1b3dbee7226c5 100644 (file)
@@ -195,7 +195,7 @@ static void mem_unlock_thread(void)
                thread_unlock_callback();
 }
 
-int MEM_check_memory_integrity()
+int MEM_check_memory_integrity(void)
 {
        const char* err_val = NULL;
        MemHead* listend;
@@ -205,7 +205,7 @@ int MEM_check_memory_integrity()
        
        err_val = check_memlist(listend);
 
-       if (err_val == 0) return 0;
+       if (err_val == NULL) return 0;
        return 1;
 }
 
@@ -286,7 +286,7 @@ static void make_memhead_header(MemHead *memh, size_t len, const char *str)
        
        memh->tag1 = MEMTAG1;
        memh->name = str;
-       memh->nextname = 0;
+       memh->nextname = NULL;
        memh->len = len;
        memh->mmap = 0;
        memh->tag2 = MEMTAG2;
@@ -353,7 +353,7 @@ void *MEM_callocN(size_t len, const char *str)
        }
        mem_unlock_thread();
        print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", SIZET_ARG(len), str, mem_in_use);
-       return 0;
+       return NULL;
 }
 
 /* note; mmap returns zero'd memory */
@@ -377,7 +377,7 @@ void *MEM_mapallocN(size_t len, const char *str)
          close(fd);
        }
 #else
-       memh= mmap(0, len+sizeof(MemHead)+sizeof(MemTail),
+       memh= mmap(NULL, len+sizeof(MemHead)+sizeof(MemTail),
                   PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0);
 #endif
 
@@ -643,13 +643,13 @@ short MEM_freeN(void *vmemh)              /* anders compileertie niet meer */
                error = 2;
                MemorY_ErroR(memh->name,"end corrupt");
                name = check_memlist(memh);
-               if (name != 0){
+               if (name != NULL){
                        if (name != memh->name) MemorY_ErroR(name,"is also corrupt");
                }
        } else{
                error = -1;
                name = check_memlist(memh);
-               if (name == 0)
+               if (name == NULL)
                        MemorY_ErroR("free","pointer not in memlist");
                else
                        MemorY_ErroR(name,"error in header");
@@ -671,14 +671,14 @@ static void addtail(volatile localListBase *listbase, void *vlink)
 {
        struct localLink *link= vlink;
 
-       if (link == 0) return;
-       if (listbase == 0) return;
+       if (link == NULL) return;
+       if (listbase == NULL) return;
 
-       link->next = 0;
+       link->next = NULL;
        link->prev = listbase->last;
 
        if (listbase->last) ((struct localLink *)listbase->last)->next = link;
-       if (listbase->first == 0) listbase->first = link;
+       if (listbase->first == NULL) listbase->first = link;
        listbase->last = link;
 }
 
@@ -686,8 +686,8 @@ static void remlink(volatile localListBase *listbase, void *vlink)
 {
        struct localLink *link= vlink;
 
-       if (link == 0) return;
-       if (listbase == 0) return;
+       if (link == NULL) return;
+       if (listbase == NULL) return;
 
        if (link->next) link->next->prev = link->prev;
        if (link->prev) link->prev->next = link->next;
@@ -733,50 +733,50 @@ static const char *check_memlist(MemHead *memh)
 
        forw = membase->first;
        if (forw) forw = MEMNEXT(forw);
-       forwok = 0;
+       forwok = NULL;
        while(forw){
                if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break;
                forwok = forw;
                if (forw->next) forw = MEMNEXT(forw->next);
-               else forw = 0;
+               else forw = NULL;
        }
 
        back = (MemHead *) membase->last;
        if (back) back = MEMNEXT(back);
-       backok = 0;
+       backok = NULL;
        while(back){
                if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break;
                backok = back;
                if (back->prev) back = MEMNEXT(back->prev);
-               else back = 0;
+               else back = NULL;
        }
 
        if (forw != back) return ("MORE THAN 1 MEMORYBLOCK CORRUPT");
 
-       if (forw == 0 && back == 0){
+       if (forw == NULL && back == NULL){
                /* geen foute headers gevonden dan maar op zoek naar memblock*/
 
                forw = membase->first;
                if (forw) forw = MEMNEXT(forw);
-               forwok = 0;
+               forwok = NULL;
                while(forw){
                        if (forw == memh) break;
                        if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break;
                        forwok = forw;
                        if (forw->next) forw = MEMNEXT(forw->next);
-                       else forw = 0;
+                       else forw = NULL;
                }
-               if (forw == 0) return (0);
+               if (forw == NULL) return NULL;
 
                back = (MemHead *) membase->last;
                if (back) back = MEMNEXT(back);
-               backok = 0;
+               backok = NULL;
                while(back){
                        if (back == memh) break;
                        if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break;
                        backok = back;
                        if (back->prev) back = MEMNEXT(back->prev);
-                       else back = 0;
+                       else back = NULL;
                }
        }
 
@@ -791,16 +791,16 @@ static const char *check_memlist(MemHead *memh)
                                backok->prev = (MemHead *)&forwok->next;
                                forwok->nextname = backok->name;
                        } else{
-                               forwok->next = 0;
+                               forwok->next = NULL;
                                membase->last = (struct localLink *) &forwok->next; 
 /*                             membase->last = (struct Link *) &forwok->next; */
                        }
                } else{
                        if (backok){
-                               backok->prev = 0;
+                               backok->prev = NULL;
                                membase->first = &backok->next;
                        } else{
-                               membase->first = membase->last = 0;
+                               membase->first = membase->last = NULL;
                        }
                }
        } else{
index 0b3d6dd4390039742b2bcd99ccaebd50d1ef7d0d..25354f2f239150b17381a6ec6986aa4ad646e894 100644 (file)
@@ -1411,7 +1411,7 @@ void make_local_object(Object *ob)
        if(ob->id.us==1) {
                ob->id.lib= NULL;
                ob->id.flag= LIB_LOCAL;
-               new_id(0, (ID *)ob, 0);
+               new_id(NULL, (ID *)ob, NULL);
 
        }
        else {
@@ -1430,9 +1430,9 @@ void make_local_object(Object *ob)
                }
                
                if(local && lib==0) {
-                       ob->id.lib= 0;
+                       ob->id.lib= NULL;
                        ob->id.flag= LIB_LOCAL;
-                       new_id(0, (ID *)ob, 0);
+                       new_id(NULL, (ID *)ob, NULL);
                }
                else if(local && lib) {
                        obn= copy_object(ob);
@@ -1440,7 +1440,7 @@ void make_local_object(Object *ob)
                        
                        sce= bmain->scene.first;
                        while(sce) {
-                               if(sce->id.lib==0) {
+                               if(sce->id.lib==NULL) {
                                        base= sce->base.first;
                                        while(base) {
                                                if(base->object==ob) {
index bf35baa4977e33af672666b340eb05e39ca62e51..c70a02ac4570d4477c000ab7e9aca56ecbf01cf6 100644 (file)
@@ -1398,7 +1398,7 @@ static PTCacheMem *ptcache_disk_frame_to_mem(PTCacheID *pid, int cfra)
        unsigned int i, error = 0;
 
        if(pf == NULL)
-               return 0;
+               return NULL;
 
        if(!ptcache_file_header_begin_read(pf))
                error = 1;
index fc864e2c11c160c7318b30d225cf9f27bb444377..5b6c6bf87328720d0785f627773a633d02f775c9 100644 (file)
@@ -558,7 +558,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
                //Using vertexs positions/normals as if a subsurface was applied 
                if(smd->subsurfLevels)
                {
-                       SubsurfModifierData ssmd= {{0}};
+                       SubsurfModifierData ssmd= {{NULL}};
                        ssmd.subdivType = ME_CC_SUBSURF;                //catmull clark
                        ssmd.levels             = smd->subsurfLevels;   //levels
 
index 1f9a9ccdc3c2f2d0ed3945b57efb1447fee2361f..54bd4a86a5e103ea17b231cb73281595bc772451 100644 (file)
@@ -1364,7 +1364,7 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, v
        CCGSubSurf *ss = ccgdm->ss;
        CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
        GPUVertexAttribs gattribs;
-       DMVertexAttribs attribs= {{{0}}};
+       DMVertexAttribs attribs= {{{NULL}}};
        MTFace *tf = dm->getFaceDataArray(dm, CD_MTFACE);
        int gridSize = ccgSubSurf_getGridSize(ss);
        int gridFaces = gridSize - 1;
index 658b6ddaa989ba48193067837f7b816e563f0267..ff58e8bd0a4b259b50191be0caa90e1fbe9b9d35 100644 (file)
@@ -160,7 +160,7 @@ void make_local_world(World *wrld)
        }
        
        if(local && lib==0) {
-               wrld->id.lib= 0;
+               wrld->id.lib= NULL;
                wrld->id.flag= LIB_LOCAL;
                new_id(NULL, (ID *)wrld, NULL);
        }
index 47606bec339069202874ad8fbebd21a3513f4336..e9db148e992753645bd34a7b30514a68c4d1aaf9 100644 (file)
 static int totnum,actnum;
 static struct direntry *files;
 
-static struct ListBase dirbase_={
-       0,0};
+static struct ListBase dirbase_={NULL, NULL};
 static struct ListBase *dirbase = &dirbase_;
 
 /* can return NULL when the size is not big enough */
@@ -400,7 +399,7 @@ unsigned int BLI_getdir(const char *dirname,  struct direntry **filelist)
        // filesel.c:freefilelist()
 
        actnum = totnum = 0;
-       files = 0;
+       files = NULL;
 
        BLI_builddir(dirname,"");
        BLI_adddirstrings();
index 8d1a77d1a2bb316296d092ded76632ed4e49c500..e89d3d5e60595a676c1cfb8442c58fe70fb0c8ae 100644 (file)
@@ -5811,8 +5811,8 @@ static BHead *read_global(BlendFileData *bfd, FileData *fd, BHead *bhead)
 static void link_global(FileData *fd, BlendFileData *bfd)
 {
        
-       bfd->curscreen= newlibadr(fd, 0, bfd->curscreen);
-       bfd->curscene= newlibadr(fd, 0, bfd->curscene);
+       bfd->curscreen= newlibadr(fd, NULL, bfd->curscreen);
+       bfd->curscene= newlibadr(fd, NULL, bfd->curscene);
        // this happens in files older than 2.35
        if(bfd->curscene==NULL) {
                if(bfd->curscreen) bfd->curscene= bfd->curscreen->scene;
@@ -5825,7 +5825,7 @@ static void vcol_to_fcol(Mesh *me)
        unsigned int *mcol, *mcoln, *mcolmain;
        int a;
 
-       if(me->totface==0 || me->mcol==0) return;
+       if(me->totface==0 || me->mcol==NULL) return;
 
        mcoln= mcolmain= MEM_mallocN(4*sizeof(int)*me->totface, "mcoln");
        mcol = (unsigned int *)me->mcol;
@@ -6802,7 +6802,7 @@ static void do_version_bone_roll_256(Bone *bone)
        float submat[3][3];
        
        copy_m3_m4(submat, bone->arm_mat);
-       mat3_to_vec_roll(submat, 0, &bone->arm_roll);
+       mat3_to_vec_roll(submat, NULL, &bone->arm_roll);
        
        for(child = bone->childbase.first; child; child = child->next)
                do_version_bone_roll_256(child);
@@ -9013,7 +9013,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                                        strcpy (simasel->dir,  U.textudir);     /* TON */
                                                        strcpy (simasel->file, "");
                                                        
-                                                       simasel->returnfunc     =  0;   
+                                                       simasel->returnfunc     =  NULL;
                                                        simasel->title[0]       =  0;
                                                }
                                        }
@@ -9303,7 +9303,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
        if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 8)) {
                Scene *sce;
                Object *ob;
-               PartEff *paf=0;
+               PartEff *paf=NULL;
 
                for(ob = main->object.first; ob; ob= ob->id.next) {
                        if(ob->soft && ob->soft->keys) {
@@ -9589,7 +9589,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                
                                fluidmd->fss->lastgoodframe = INT_MAX;
                                fluidmd->fss->flag = 0;
-                               fluidmd->fss->meshSurfNormals = 0;
+                               fluidmd->fss->meshSurfNormals = NULL;
                        }
                }
        }
@@ -12491,7 +12491,7 @@ static void expand_main(FileData *fd, Main *mainvar)
        ID *id;
        int a, doit= 1;
 
-       if(fd==0) return;
+       if(fd==NULL) return;
 
        while(doit) {
                doit= 0;
index 649d260728eeab8cb53378781e3a0533765f091e..510ae31db514fe1efe4be82a9468d7eb052f611a 100644 (file)
@@ -303,7 +303,7 @@ static void gpu_make_repbind(Image *ima)
        if(ima->repbind) {
                glDeleteTextures(ima->totbind, (GLuint *)ima->repbind);
                MEM_freeN(ima->repbind);
-               ima->repbind= 0;
+               ima->repbind= NULL;
                ima->tpageflag &= ~IMA_MIPMAP_COMPLETE;
        }
 
@@ -315,12 +315,12 @@ static void gpu_make_repbind(Image *ima)
 
 static void gpu_clear_tpage(void)
 {
-       if(GTS.lasttface==0)
+       if(GTS.lasttface==NULL)
                return;
        
-       GTS.lasttface= 0;
+       GTS.lasttface= NULL;
        GTS.curtile= 0;
-       GTS.curima= 0;
+       GTS.curima= NULL;
        if(GTS.curtilemode!=0) {
                glMatrixMode(GL_TEXTURE);
                glLoadIdentity();
@@ -432,7 +432,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
        if(compare && ima == GTS.curima && GTS.curtile == GTS.tile &&
           GTS.tilemode == GTS.curtilemode && GTS.curtileXRep == GTS.tileXRep &&
           GTS.curtileYRep == GTS.tileYRep)
-               return (ima!=0);
+               return (ima != NULL);
 
        /* if tiling mode or repeat changed, change texture matrix to fit */
        if(GTS.tilemode!=GTS.curtilemode || GTS.curtileXRep!=GTS.tileXRep ||
@@ -469,7 +469,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
        
        if(GTS.tilemode) {
                /* tiled mode */
-               if(ima->repbind==0) gpu_make_repbind(ima);
+               if(ima->repbind==NULL) gpu_make_repbind(ima);
                if(GTS.tile>=ima->totbind) GTS.tile= 0;
                
                /* this happens when you change repeat buttons */
@@ -588,7 +588,7 @@ int GPU_set_tpage(MTFace *tface, int mipmap)
        Image *ima;
        
        /* check if we need to clear the state */
-       if(tface==0) {
+       if(tface==NULL) {
                gpu_clear_tpage();
                return 0;
        }
@@ -612,7 +612,7 @@ int GPU_set_tpage(MTFace *tface, int mipmap)
                glDisable(GL_TEXTURE_2D);
                
                GTS.curtile= 0;
-               GTS.curima= 0;
+               GTS.curima= NULL;
                GTS.curtilemode= 0;
                GTS.curtileXRep = 0;
                GTS.curtileYRep = 0;
index 9166c697f8e0513c36972b3a3bca2c05b01ce74d..f644700fb81182325a90fc666fe1f9ac6510dcf2 100644 (file)
@@ -923,7 +923,7 @@ static void do_material_tex(GPUShadeInput *shi)
                        mtex= ma->mtex[tex_nr];
                        
                        tex= mtex->tex;
-                       if(tex==0) continue;
+                       if(tex == NULL) continue;
 
                        /* which coords */
                        if(mtex->texco==TEXCO_ORCO)
index 205819e4593527fa4b6f38fda7cf68e21ae585f7..6d915a18f7827f7c1d7d4c8b11bf95762743df87 100644 (file)
@@ -400,7 +400,7 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
                        /* end effector in world space */
                        copy_m4_m4(end_pose, pchan->pose_mat);
                        VECCOPY(end_pose[3], pchan->pose_tail);
-                       mul_serie_m4(world_pose, goalinv, ob->obmat, end_pose, 0, 0, 0, 0, 0);
+                       mul_serie_m4(world_pose, goalinv, ob->obmat, end_pose, NULL, NULL, NULL, NULL, NULL);
                        
                        /* blend position */
                        goalpos[0]= fac*goalpos[0] + mfac*world_pose[3][0];
index 93f4b7763d798cb67d19a3ef832277b0e71534e8..a8b9e21331dd26cd00e3d9417672c1461d1338a5 100644 (file)
@@ -128,7 +128,7 @@ static void freeencodedbufferImBuf(ImBuf *ibuf)
        if(ibuf->encodedbuffer && (ibuf->mall & IB_mem))
                MEM_freeN(ibuf->encodedbuffer);
 
-       ibuf->encodedbuffer = 0;
+       ibuf->encodedbuffer = NULL;
        ibuf->encodedbuffersize = 0;
        ibuf->encodedsize = 0;
        ibuf->mall &= ~IB_mem;
@@ -427,11 +427,11 @@ ImBuf *IMB_dupImBuf(ImBuf *ibuf1)
        
        // set malloc flag
        tbuf.mall               = ibuf2->mall;
-       tbuf.c_handle           = 0;
+       tbuf.c_handle           = NULL;
        tbuf.refcounter         = 0;
 
        // for now don't duplicate metadata
-       tbuf.metadata = 0;
+       tbuf.metadata = NULL;
 
        *ibuf2 = tbuf;
        
@@ -450,12 +450,12 @@ static void imbuf_cache_destructor(void *data)
        IMB_freezbuffloatImBuf(ibuf);
        freeencodedbufferImBuf(ibuf);
 
-       ibuf->c_handle = 0;
+       ibuf->c_handle = NULL;
 }
 
 static MEM_CacheLimiterC **get_imbuf_cache_limiter(void)
 {
-       static MEM_CacheLimiterC *c = 0;
+       static MEM_CacheLimiterC *c = NULL;
 
        if(!c)
                c = new_MEM_CacheLimiter(imbuf_cache_destructor);
@@ -466,7 +466,7 @@ static MEM_CacheLimiterC **get_imbuf_cache_limiter(void)
 void IMB_free_cache_limiter(void)
 {
        delete_MEM_CacheLimiter(*get_imbuf_cache_limiter());
-       *get_imbuf_cache_limiter() = 0;
+       *get_imbuf_cache_limiter() = NULL;
 }
 
 void IMB_cache_limiter_insert(ImBuf *i)
@@ -485,7 +485,7 @@ void IMB_cache_limiter_unmanage(ImBuf *i)
 {
        if(i->c_handle) {
                MEM_CacheLimiter_unmanage(i->c_handle);
-               i->c_handle = 0;
+               i->c_handle = NULL;
        }
 }
 
index ce676d8c65f5e9c1758e022c9812da69959448fb..a964f345b2b3457d2ebe00badb3f0f10c1a98b0e 100644 (file)
@@ -353,7 +353,7 @@ void IMB_free_anim(struct anim * anim) {
 }
 
 void IMB_close_anim(struct anim * anim) {
-       if (anim == 0) return;
+       if (anim == NULL) return;
 
        IMB_free_anim(anim);
 }
@@ -454,7 +454,7 @@ static int startavi (struct anim *anim) {
        }
        
        anim->duration = anim->avi->header->TotalFrames;
-       anim->params = 0;
+       anim->params = NULL;
 
        anim->x = anim->avi->header->Width;
        anim->y = anim->avi->header->Height;
@@ -1034,9 +1034,9 @@ static void free_anim_redcode(struct anim * anim) {
 /* gelukt, haal dan eerste plaatje van animatie */
 
 static struct ImBuf * anim_getnew(struct anim * anim) {
-       struct ImBuf *ibuf = 0;
+       struct ImBuf *ibuf = NULL;
 
-       if (anim == NULL) return(0);
+       if (anim == NULL) return(NULL);
 
        free_anim_movie(anim);
        free_anim_avi(anim);
@@ -1051,7 +1051,7 @@ static struct ImBuf * anim_getnew(struct anim * anim) {
 #endif
 
 
-       if (anim->curtype != 0) return (0);
+       if (anim->curtype != 0) return (NULL);
        anim->curtype = imb_get_anim_type(anim->name);  
 
        switch (anim->curtype) {
@@ -1063,13 +1063,13 @@ static struct ImBuf * anim_getnew(struct anim * anim) {
                }
                break;
        case ANIM_MOVIE:
-               if (startmovie(anim)) return (0);
+               if (startmovie(anim)) return (NULL);
                ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0); /* fake */
                break;
        case ANIM_AVI:
                if (startavi(anim)) {
                        printf("couldnt start avi\n"); 
-                       return (0);
+                       return (NULL);
                }
                ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0);
                break;
@@ -1096,7 +1096,7 @@ static struct ImBuf * anim_getnew(struct anim * anim) {
 }
 
 struct ImBuf * IMB_anim_previewframe(struct anim * anim) {
-       struct ImBuf * ibuf = 0;
+       struct ImBuf * ibuf = NULL;
        int position = 0;
        
        ibuf = IMB_anim_absolute(anim, 0);
@@ -1109,27 +1109,27 @@ struct ImBuf * IMB_anim_previewframe(struct anim * anim) {
 }
 
 struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) {
-       struct ImBuf * ibuf = 0;
+       struct ImBuf * ibuf = NULL;
        char head[256], tail[256];
        unsigned short digits;
        int pic;
        int filter_y;
-       if (anim == NULL) return(0);
+       if (anim == NULL) return(NULL);
 
        filter_y = (anim->ib_flags & IB_animdeinterlace);
 
        if (anim->curtype == 0) {
                ibuf = anim_getnew(anim);
                if (ibuf == NULL) {
-                       return (0);
+                       return(NULL);
                }
 
                IMB_freeImBuf(ibuf); /* ???? */
                ibuf= NULL;
        }
 
-       if (position < 0) return(0);
-       if (position >= anim->duration) return(0);
+       if (position < 0) return(NULL);
+       if (position >= anim->duration) return(NULL);
 
        switch(anim->curtype) {
        case ANIM_SEQUENCE:
index 3d9af0b9f977ae3145f9f6e11aeee9885d2a7573..d79acc88a80a43f743410704b8ebafd2c0435d6d 100644 (file)
@@ -108,7 +108,7 @@ int imb_is_a_bmp(unsigned char *buf) {
 
 struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags)
 {
-       struct ImBuf *ibuf = 0;
+       struct ImBuf *ibuf = NULL;
        BMPINFOHEADER bmi;
        int x, y, depth, skip, i;
        unsigned char *bmp, *rect;
@@ -116,7 +116,7 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags)
        
        (void)size; /* unused */
 
-       if (checkbmp(mem) == 0) return(0);
+       if (checkbmp(mem) == 0) return(NULL);
 
        if ((mem[0] == 'B') && (mem[1] == 'M')) {
                /* skip fileheader */
index cbeda1b3399e8f7a70dbe6cb643071815d803b46..ff98ac6016627e6824e14ba8c86b101213ce3de9 100644 (file)
@@ -52,7 +52,7 @@ void IMB_de_interlace(struct ImBuf *ibuf)
 {
        struct ImBuf * tbuf1, * tbuf2;
        
-       if (ibuf == 0) return;
+       if (ibuf == NULL) return;
        if (ibuf->flags & IB_fields) return;
        ibuf->flags |= IB_fields;
        
@@ -79,7 +79,7 @@ void IMB_interlace(struct ImBuf *ibuf)
 {
        struct ImBuf * tbuf1, * tbuf2;
 
-       if (ibuf == 0) return;
+       if (ibuf == NULL) return;
        ibuf->flags &= ~IB_fields;
 
        ibuf->y *= 2;
index 8370f1934c879750d3e00dfae679321d1f7ab04b..adbf3659d3ac40813d756d5fc6229db46025beca 100644 (file)
@@ -221,7 +221,7 @@ static void test_endian_zbuf(struct ImBuf *ibuf)
        int *zval;
        
        if( BIG_LONG(1) == 1 ) return;
-       if(ibuf->zbuf==0) return;
+       if(ibuf->zbuf == NULL) return;
        
        len= ibuf->x*ibuf->y;
        zval= ibuf->zbuf;
@@ -276,14 +276,14 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
        readheader(inf, &image);
        if(image.imagic != IMAGIC) {
                fprintf(stderr,"longimagedata: bad magic number in image file\n");
-               return(0);
+               return(NULL);
        }
        
        rle = ISRLE(image.type);
        bpp = BPP(image.type);
        if(bpp != 1 && bpp != 2) {
                fprintf(stderr,"longimagedata: image must have 1 or 2 byte per pix chan\n");
-               return(0);
+               return(NULL);
        }
        
        xsize = image.xsize;
@@ -826,7 +826,7 @@ int imb_saveiris(struct ImBuf * ibuf, const char *name, int flags)
        int ret;
 
        zsize = (ibuf->depth + 7) >> 3;
-       if (flags & IB_zbuf &&  ibuf->zbuf != 0) zsize = 8;
+       if (flags & IB_zbuf &&  ibuf->zbuf != NULL) zsize = 8;
        
        IMB_convert_rgba_to_abgr(ibuf);
        test_endian_zbuf(ibuf);
index 24ddd2a85a940f8740975fe934bb15d12411a303..93ebd0efcb06806395ad841baefe6b7702ffde9c 100644 (file)
@@ -271,10 +271,10 @@ handle_app1 (j_decompress_ptr cinfo)
 static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int flags)
 {
        JSAMPARRAY row_pointer;
-       JSAMPLE * buffer = 0;
+       JSAMPLE * buffer = NULL;
        int row_stride;
        int x, y, depth, r, g, b, k;
-       struct ImBuf * ibuf = 0;
+       struct ImBuf * ibuf = NULL;
        uchar * rect;
        jpeg_saved_marker_ptr marker;
        char *str, *key, *value;
@@ -470,7 +470,7 @@ ImBuf * imb_load_jpeg (unsigned char * buffer, size_t size, int flags)
 
 static void write_jpeg(struct jpeg_compress_struct * cinfo, struct ImBuf * ibuf)
 {
-       JSAMPLE * buffer = 0;
+       JSAMPLE * buffer = NULL;
        JSAMPROW row_pointer[1];
        uchar * rect;
        int x, y;
index 8be2c26c64f6609834963f3aa1f248a1adc58bd4..200ff0af9af2af6beb7fa1d1028ee7e253aa135a 100644 (file)
@@ -104,11 +104,11 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
        png_structp png_ptr;
        png_infop info_ptr;
 
-       unsigned char *pixels = 0;
+       unsigned char *pixels = NULL;
        unsigned char *from, *to;
-       png_bytepp row_pointers = 0;
+       png_bytepp row_pointers = NULL;
        int i, bytesperpixel, color_type = PNG_COLOR_TYPE_GRAY;
-       FILE *fp = 0;
+       FILE *fp = NULL;
 
        /* use the jpeg quality setting for compression */
        int compression;
@@ -299,11 +299,11 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
 
 struct ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags)
 {
-       struct ImBuf *ibuf = 0;
+       struct ImBuf *ibuf = NULL;
        png_structp png_ptr;
        png_infop info_ptr;
-       unsigned char *pixels = 0;
-       png_bytepp row_pointers = 0;
+       unsigned char *pixels = NULL;
+       png_bytepp row_pointers = NULL;
        png_uint_32 width, height;
        int bit_depth, color_type;
        PNGReadStruct ps;
@@ -311,13 +311,13 @@ struct ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags)
        unsigned char *from, *to;
        int i, bytesperpixel;
 
-       if (imb_is_a_png(mem) == 0) return(0);
+       if (imb_is_a_png(mem) == 0) return(NULL);
 
        png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
                NULL, NULL, NULL);
        if (png_ptr == NULL) {
                printf("Cannot png_create_read_struct\n");
-               return 0;
+               return NULL;
        }
 
        info_ptr = png_create_info_struct(png_ptr);
@@ -325,7 +325,7 @@ struct ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags)
                png_destroy_read_struct(&png_ptr, (png_infopp)NULL, 
                        (png_infopp)NULL);
                printf("Cannot png_create_info_struct\n");
-               return 0;
+               return NULL;
        }
 
        ps.size = size; /* XXX, 4gig limit! */
@@ -339,7 +339,7 @@ struct ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags)
                if (pixels) MEM_freeN(pixels);
                if (row_pointers) MEM_freeN(row_pointers);
                if (ibuf) IMB_freeImBuf(ibuf);
-               return 0;
+               return NULL;
        }
 
        // png_set_sig_bytes(png_ptr, 8);
index a43fa7fb80242d4818fac52374c8a426a5b35857..849b3ff0ce288a09ce71259cf5cd62acc9b47563 100644 (file)
@@ -86,14 +86,14 @@ ImBuf *IMB_loadifffile(int file, int flags)
        unsigned char *mem;
        size_t size;
 
-       if(file == -1) return 0;
+       if(file == -1) return NULL;
 
        size= BLI_filesize(file);
 
-       mem= mmap(0, size, PROT_READ, MAP_SHARED, file, 0);
+       mem= mmap(NULL, size, PROT_READ, MAP_SHARED, file, 0);
        if(mem==(unsigned char*)-1) {
                fprintf(stderr, "Couldn't get mapping\n");
-               return 0;
+               return NULL;
        }
 
        ibuf= IMB_ibImageFromMemory(mem, size, flags);
@@ -128,7 +128,7 @@ ImBuf *IMB_loadiffname(const char *name, int flags)
        imb_cache_filename(filename, name, flags);
 
        file = open(filename, O_BINARY|O_RDONLY);
-       if(file < 0) return 0;
+       if(file < 0) return NULL;
 
        ibuf= IMB_loadifffile(file, flags);
 
@@ -154,7 +154,7 @@ ImBuf *IMB_testiffname(char *name, int flags)
        imb_cache_filename(filename, name, flags);
 
        file = open(filename,O_BINARY|O_RDONLY);
-       if(file < 0) return 0;
+       if(file < 0) return NULL;
 
        ibuf=IMB_loadifffile(file, flags|IB_test|IB_multilayer);
        if(ibuf) {
@@ -177,7 +177,7 @@ static void imb_loadtilefile(ImBuf *ibuf, int file, int tx, int ty, unsigned int
 
        size= BLI_filesize(file);
 
-       mem= mmap(0, size, PROT_READ, MAP_SHARED, file, 0);
+       mem= mmap(NULL, size, PROT_READ, MAP_SHARED, file, 0);
        if(mem==(unsigned char*)-1) {
                fprintf(stderr, "Couldn't get memory mapping for %s\n", ibuf->cachename);
                return;
index e3057e862b85b1865dfb37e71c8ebc6e9caf91d1..13e8e1fb862ff5016f73456974487c5a05f9c7aa 100644 (file)
@@ -1039,9 +1039,9 @@ typedef struct Scene {
 
 /* depricate this! */
 #define TESTBASE(v3d, base)    ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
-#define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
-#define TESTBASELIB_BGMODE(v3d, scene, base)   ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
-#define BASE_EDITABLE_BGMODE(v3d, scene, base)   (((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+#define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+#define TESTBASELIB_BGMODE(v3d, scene, base)   ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+#define BASE_EDITABLE_BGMODE(v3d, scene, base)   (((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
 #define BASE_SELECTABLE(v3d, base)      ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
 #define BASE_VISIBLE(v3d, base)         ((base->lay & v3d->lay) && (base->object->restrictflag & OB_RESTRICT_VIEW)==0)
 #define FIRSTBASE              scene->base.first
index 50083a3472c8255788b524e0a9b28eb30e9c049b..15f63883191ea4f50aef18379a43a66113868139 100644 (file)
@@ -615,7 +615,7 @@ int convert_include(char *filename)
                                                                                sp[0]= type;
                                                                                sp[1]= name;
 
-                                                                               if ((debugSDNA>1) && (names[name] != )) printf("%s |", names[name]);
+                                                                               if ((debugSDNA>1) && (names[name] != NULL)) printf("%s |", names[name]);
 
                                                                                structpoin[1]++;
                                                                                sp+= 2;
@@ -630,7 +630,7 @@ int convert_include(char *filename)
 
                                                                        sp[0]= type;
                                                                        sp[1]= name;
-                                                                       if ((debugSDNA > 1) && (names[name] != )) printf("%s ||", names[name]);
+                                                                       if ((debugSDNA > 1) && (names[name] != NULL)) printf("%s ||", names[name]);
 
                                                                        structpoin[1]++;
                                                                        sp+= 2;
@@ -660,7 +660,7 @@ int convert_include(char *filename)
 int arraysize(char *astr, int len)
 {
        int a, mul=1;
-       char str[100], *cp=0;
+       char str[100], *cp=NULL;
 
        memcpy(str, astr, len+1);
        
index e4830494931cf3d7a8e809126d0f0067212a4932..ae62ef55c0137249db378cce9b3f5a641773ebcf 100644 (file)
@@ -363,7 +363,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
 
        prop= RNA_def_property(srna, "idp_array", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "PropertyGroup");
-       RNA_def_property_collection_funcs(prop, "rna_IDPArray_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_IDPArray_length", 0, 0);
+       RNA_def_property_collection_funcs(prop, "rna_IDPArray_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_IDPArray_length", NULL, NULL);
        RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
 
        // never tested, maybe its useful to have this?
index c422d787e169d809a47d7648bee95678925b2b77..17dc775787e4f726cc5607e38b0818c86da91d26 100644 (file)
@@ -62,7 +62,7 @@
 
 #include "rna_internal.h"
 
-const PointerRNA PointerRNA_NULL= {{0}};
+const PointerRNA PointerRNA_NULL= {{NULL}};
 
 /* Init/Exit */
 
@@ -110,7 +110,7 @@ void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
        StructRNA *type, *idtype= NULL;
 
        if(id) {
-               PointerRNA tmp= {{0}};
+               PointerRNA tmp= {{NULL}};
                tmp.data= id;
                idtype= rna_ID_refine(&tmp);
                
@@ -3761,7 +3761,7 @@ char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, in
        }
        else {
                printf("RNA_string_get_alloc: %s.%s not found.\n", ptr->type->identifier, name);
-               return 0;
+               return NULL;
        }
 }
 
index d80e2c0c4652443fe808be9f63ff2dcc1234c7fe..b690a4f419aa5ef50481180500baa6c01e9dd047 100644 (file)
@@ -169,9 +169,9 @@ static void rna_KeyingSetInfo_unregister(const bContext *C, StructRNA *type)
 
 static StructRNA *rna_KeyingSetInfo_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
 {
-       KeyingSetInfo dummyksi = {0};
+       KeyingSetInfo dummyksi = {NULL};
        KeyingSetInfo *ksi;
-       PointerRNA dummyptr = {{0}};
+       PointerRNA dummyptr = {{NULL}};
        int have_function[3];
 
        /* setup dummy type info to store static properties in */
index f30c130469a6e185d3a7ca10371f7e4250184f9b..c32681c28264d6fad824313aebea6c2e3e384c86 100644 (file)
@@ -49,7 +49,7 @@
 
 /* Global used during defining */
 
-BlenderDefRNA DefRNA = {0, {0, 0}, {0, 0}, 0, 0, 0, 0, 1};
+BlenderDefRNA DefRNA = {NULL, {NULL, NULL}, {NULL, NULL}, NULL, 0, 0, 0, 1};
 
 /* Duplicated code since we can't link in blenkernel or blenlib */
 
@@ -66,7 +66,7 @@ void rna_addtail(ListBase *listbase, void *vlink)
        link->prev = listbase->last;
 
        if (listbase->last) ((Link *)listbase->last)->next = link;
-       if (listbase->first == 0) listbase->first = link;
+       if (listbase->first == NULL) listbase->first = link;
        listbase->last = link;
 }
 
@@ -659,7 +659,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
 
                if(DefRNA.preprocess) {
                        RNA_def_property_struct_type(prop, "Property");
-                       RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", 0, 0, "rna_builtin_properties_lookup_string");
+                       RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", NULL, NULL, "rna_builtin_properties_lookup_string");
                }
                else {
 #ifdef RNA_RUNTIME
index 7aca187acbf168366e0fefe5d374b0f2c19e2de4..a921bbbafaddd79522ce8843f519349098ebc233 100644 (file)
@@ -296,7 +296,7 @@ static NlaStrip *rna_NlaStrip_new(NlaTrack *track, bContext *C, ReportList *repo
         *      - only the nla_tracks list is needed there, which we aim to reverse engineer here...
         */
        {
-               AnimData adt = {0};
+               AnimData adt = {NULL};
                NlaTrack *nlt, *nlt_p;
                
                /* 'first' NLA track is found by going back up chain of given track's parents until we fall off */
index eca06f87672207c6c03f41de5bbad57963a10b4b..cd3796af435425dcae85ba2408ee4cbe2cc8f7db 100644 (file)
@@ -377,7 +377,7 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int
 
 void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], float ray_end[3], float r_location[3], float r_normal[3], int *index)
 {
-       BVHTreeFromMesh treeData= {0};
+       BVHTreeFromMesh treeData= {NULL};
        
        if(ob->derivedFinal==NULL) {
                BKE_reportf(reports, RPT_ERROR, "object \"%s\" has no mesh data to be used for ray casting.", ob->id.name+2);
index 817a59eb839310a1d54d1178be263ee7b67a7552..7453ca20c7d258608fbcb1fb6a73bdfa2a67d0f1 100644 (file)
@@ -477,12 +477,12 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 
                if(part->pd->forcefield != PFIELD_TEXTURE && part->pd->tex) {
                        part->pd->tex->id.us--;
-                       part->pd->tex= 0;
+                       part->pd->tex= NULL;
                }
 
                if(part->pd2->forcefield != PFIELD_TEXTURE && part->pd2->tex) {
                        part->pd2->tex->id.us--;
-                       part->pd2->tex= 0;
+                       part->pd2->tex= NULL;
                }
 
                DAG_id_tag_update(&part->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME|PSYS_RECALC_RESET);
@@ -494,7 +494,7 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 
                if(ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) {
                        ob->pd->tex->id.us--;
-                       ob->pd->tex= 0;
+                       ob->pd->tex= NULL;
                }
 
                DAG_id_tag_update(&ob->id, OB_RECALC_OB);
index 670857c7d9ac452bd2e96d484e2242b35fa19861..658e1dc3b80b5e19b329647188cd0a9b87560eb8 100644 (file)
@@ -1211,7 +1211,7 @@ static void rna_def_pose(BlenderRNA *brna)
        RNA_def_property_collection_sdna(prop, NULL, "chanbase", NULL);
        RNA_def_property_struct_type(prop, "PoseBone");
        RNA_def_property_ui_text(prop, "Pose Bones", "Individual pose bones for the armature");
-       RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, "rna_PoseBones_lookup_string"); /* can be removed, only for fast lookup */
+       RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, "rna_PoseBones_lookup_string"); /* can be removed, only for fast lookup */
        /* bone groups */
        prop= RNA_def_property(srna, "bone_groups", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_collection_sdna(prop, NULL, "agroups", NULL);
index 5a3903a290d3ab106d0dfd06ebd4ae372264a212..49b28579ee1d9b5285a369d29476637d5949d676 100644 (file)
@@ -115,8 +115,8 @@ static void rna_RenderEngine_unregister(const bContext *C, StructRNA *type)
 
 static StructRNA *rna_RenderEngine_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
 {
-       RenderEngineType *et, dummyet = {0};
-       RenderEngine dummyengine= {0};
+       RenderEngineType *et, dummyet = {NULL};
+       RenderEngine dummyengine= {NULL};
        PointerRNA dummyptr;
        int have_function[1];
 
index aabf38bd2ce41f541977dd02a11422dc06d3003c..203a399ea6c04f2693fea707d3760ab7b686e4c7 100644 (file)
@@ -310,7 +310,7 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point
 {
        StructRNA *srna;
        PropertyRNA *prop;
-       PointerRNA propptr= {{0}};
+       PointerRNA propptr= {{NULL}};
 
        srna= ptr->type;
 
index ee832d34bf73718dc283fbc615efccb8a80718b2..d48c1d35c13e9c3a65af761a9f279e360af59217 100644 (file)
@@ -171,8 +171,8 @@ static void rna_Panel_unregister(const bContext *C, StructRNA *type)
 static StructRNA *rna_Panel_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
 {
        ARegionType *art;
-       PanelType *pt, dummypt = {0};
-       Panel dummypanel= {0};
+       PanelType *pt, dummypt = {NULL};
+       Panel dummypanel= {NULL};
        PointerRNA dummyptr;
        int have_function[3];
 
@@ -286,8 +286,8 @@ static void rna_Header_unregister(const bContext *C, StructRNA *type)
 static StructRNA *rna_Header_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
 {
        ARegionType *art;
-       HeaderType *ht, dummyht = {0};
-       Header dummyheader= {0};
+       HeaderType *ht, dummyht = {NULL};
+       Header dummyheader= {NULL};
        PointerRNA dummyhtr;
        int have_function[1];
 
@@ -404,8 +404,8 @@ static void rna_Menu_unregister(const bContext *C, StructRNA *type)
 
 static StructRNA *rna_Menu_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
 {
-       MenuType *mt, dummymt = {0};
-       Menu dummymenu= {0};
+       MenuType *mt, dummymt = {NULL};
+       Menu dummymenu= {NULL};
        PointerRNA dummymtr;
        int have_function[2];
 
index 40d1996d8ce58880a1b752d0f41549a9da4d7a9f..631af91a5bff40b0523bf57367b34dd2f1543b43 100644 (file)
@@ -836,8 +836,8 @@ static char _operator_name[OP_MAX_TYPENAME];
 static char _operator_descr[1024];
 static StructRNA *rna_Operator_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
 {
-       wmOperatorType dummyot = {0};
-       wmOperator dummyop= {0};
+       wmOperatorType dummyot = {NULL};
+       wmOperator dummyop= {NULL};
        PointerRNA dummyotr;
        int have_function[6];
 
@@ -939,8 +939,8 @@ static StructRNA *rna_Operator_register(bContext *C, ReportList *reports, void *
 
 static StructRNA *rna_MacroOperator_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
 {
-       wmOperatorType dummyot = {0};
-       wmOperator dummyop= {0};
+       wmOperatorType dummyot = {NULL};
+       wmOperator dummyop= {NULL};
        PointerRNA dummyotr;
        int have_function[4];