Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/guardedalloc/intern/mallocn.c52
-rw-r--r--source/blender/blenkernel/intern/object.c8
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c2
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c2
-rw-r--r--source/blender/blenkernel/intern/world.c2
-rw-r--r--source/blender/blenlib/intern/storage.c5
-rw-r--r--source/blender/blenloader/intern/readfile.c16
-rw-r--r--source/blender/gpu/intern/gpu_draw.c16
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c2
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c14
-rw-r--r--source/blender/imbuf/intern/anim_movie.c26
-rw-r--r--source/blender/imbuf/intern/bmp.c4
-rw-r--r--source/blender/imbuf/intern/divers.c4
-rw-r--r--source/blender/imbuf/intern/iris.c8
-rw-r--r--source/blender/imbuf/intern/jpeg.c6
-rw-r--r--source/blender/imbuf/intern/png.c20
-rw-r--r--source/blender/imbuf/intern/readimage.c12
-rw-r--r--source/blender/makesdna/DNA_scene_types.h6
-rw-r--r--source/blender/makesdna/intern/makesdna.c6
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_access.c6
-rw-r--r--source/blender/makesrna/intern/rna_animation.c4
-rw-r--r--source/blender/makesrna/intern/rna_define.c6
-rw-r--r--source/blender/makesrna/intern/rna_nla.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c6
-rw-r--r--source/blender/makesrna/intern/rna_pose.c2
-rw-r--r--source/blender/makesrna/intern/rna_render.c4
-rw-r--r--source/blender/makesrna/intern/rna_rna.c2
-rw-r--r--source/blender/makesrna/intern/rna_ui.c12
-rw-r--r--source/blender/makesrna/intern/rna_wm.c8
33 files changed, 135 insertions, 136 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index e56f3c3d598..f1c9f9e6363 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -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{
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 0b3d6dd4390..25354f2f239 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -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) {
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index bf35baa4977..c70a02ac457 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -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;
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index fc864e2c11c..5b6c6bf8732 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -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
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 1f9a9ccdc3c..54bd4a86a5e 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -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;
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 658b6ddaa98..ff58e8bd0a4 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -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);
}
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 47606bec339..e9db148e992 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -100,8 +100,7 @@
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();
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 8d1a77d1a2b..e89d3d5e605 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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;
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 649d260728e..510ae31db51 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -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;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 9166c697f8e..f644700fb81 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -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)
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c
index 205819e4593..6d915a18f78 100644
--- a/source/blender/ikplugin/intern/iksolver_plugin.c
+++ b/source/blender/ikplugin/intern/iksolver_plugin.c
@@ -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];
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 93f4b7763d7..a8b9e21331d 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -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;
}
}
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index ce676d8c65f..a964f345b2b 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -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:
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index 3d9af0b9f97..d79acc88a80 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -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 */
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index cbeda1b3399..ff98ac60166 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -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;
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index 8370f1934c8..adbf3659d3a 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -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);
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 24ddd2a85a9..93ebd0efcb0 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -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;
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index 8be2c26c64f..200ff0af9af 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -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);
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index a43fa7fb802..849b3ff0ce2 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -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;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index e3057e862b8..13e8e1fb862 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -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
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 50083a3472c..15f63883191 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -615,7 +615,7 @@ int convert_include(char *filename)
sp[0]= type;
sp[1]= name;
- if ((debugSDNA>1) && (names[name] != 0 )) 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] != 0 )) 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);
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index e4830494931..ae62ef55c01 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -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?
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index c422d787e16..17dc775787e 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -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;
}
}
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index d80e2c0c465..b690a4f419a 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -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 */
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index f30c130469a..c32681c2826 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -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
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 7aca187acbf..a921bbbafad 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -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 */
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index eca06f87672..cd3796af435 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 817a59eb839..7453ca20c7d 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 670857c7d9a..658e1dc3b80 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 5a3903a290d..49b28579ee1 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -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];
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index aabf38bd2ce..203a399ea6c 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -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;
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index ee832d34bf7..d48c1d35c13 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -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];
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 40d1996d8ce..631af91a5bf 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -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];