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:
authorCampbell Barton <ideasman42@gmail.com>2011-09-16 12:20:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-16 12:20:21 +0400
commit2222f536f81210b557f62a5ea037aa9fa7f4e98b (patch)
tree3a8b96e2b8cb1cf93fa8422e98e0c577649f8674 /source/blender/imbuf
parent0849eaebbfe6cf08a2a7f52ff79cc3e9cc4f0657 (diff)
use replace 0 with NULL for pointers, set some functions static
also fixed own errors in recent static check commit.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/indexer.c18
-rw-r--r--source/blender/imbuf/intern/jp2.c4
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 3528318ba81..2e45c0eb07a 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -159,24 +159,24 @@ struct anim_index * IMB_indexer_open(const char * name)
int i;
if (!fp) {
- return 0;
+ return NULL;
}
if (fread(header, 12, 1, fp) != 1) {
fclose(fp);
- return 0;
+ return NULL;
}
header[12] = 0;
if (memcmp(header, magic, 8) != 0) {
fclose(fp);
- return 0;
+ return NULL;
}
if (atoi(header+9) != INDEX_FILE_VERSION) {
fclose(fp);
- return 0;
+ return NULL;
}
idx = MEM_callocN( sizeof(struct anim_index), "anim_index");
@@ -916,7 +916,7 @@ static AviMovie * alloc_proxy_output_avi(
if (AVI_open_compress (filename, avi, 1, format) != AVI_ERROR_NONE) {
MEM_freeN(avi);
- return 0;
+ return NULL;
}
AVI_set_compress_option (avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_WIDTH, &x);
@@ -1000,7 +1000,7 @@ static void index_rebuild_fallback(struct anim * anim,
s_ibuf->rect, x * y * 4);
/* note that libavi free's the buffer... */
- s_ibuf->rect = 0;
+ s_ibuf->rect = NULL;
IMB_freeImBuf(s_ibuf);
}
@@ -1056,14 +1056,14 @@ void IMB_free_indices(struct anim * anim)
for (i = 0; i < IMB_PROXY_MAX_SLOT; i++) {
if (anim->proxy_anim[i]) {
IMB_close_anim(anim->proxy_anim[i]);
- anim->proxy_anim[i] = 0;
+ anim->proxy_anim[i] = NULL;
}
}
for (i = 0; i < IMB_TC_MAX_SLOT; i++) {
if (anim->curr_idx[i]) {
IMB_indexer_close(anim->curr_idx[i]);
- anim->curr_idx[i] = 0;
+ anim->curr_idx[i] = NULL;
}
}
@@ -1116,7 +1116,7 @@ struct anim_index * IMB_anim_open_index(
}
if (anim->indices_tried & tc) {
- return 0;
+ return NULL;
}
get_tc_filename(anim, tc, fname);
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index a4eae492a58..af7f098585e 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -97,7 +97,7 @@ static void info_callback(const char *msg, void *client_data) {
struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
{
- struct ImBuf *ibuf = 0;
+ struct ImBuf *ibuf = NULL;
int use_float = 0; /* for precision higher then 8 use float */
long signed_offsets[4]= {0, 0, 0, 0};
@@ -117,7 +117,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
opj_dinfo_t* dinfo = NULL; /* handle to a decompressor */
opj_cio_t *cio = NULL;
- if (check_jp2(mem) == 0) return(0);
+ if (check_jp2(mem) == 0) return(NULL);
/* configure the event callbacks (not required) */
memset(&event_mgr, 0, sizeof(opj_event_mgr_t));