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:
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r--intern/guardedalloc/intern/mallocn.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index cad0e549060..f1a83583715 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -290,7 +290,9 @@ static void make_memhead_header(MemHead *memh, size_t len, const char *str)
memt->tag3 = MEMTAG3;
addtail(membase, &memh->next);
- if (memh->next) memh->nextname = MEMNEXT(memh->next)->name;
+ if (memh->next) {
+ memh->nextname = MEMNEXT(memh->next)->name;
+ }
totblock++;
mem_in_use += len;
@@ -681,8 +683,12 @@ static void addtail(volatile localListBase *listbase, void *vlink)
{
struct localLink *link = vlink;
+ /* for a generic API error checks here is fine but
+ * the limited use here they will never be NULL */
+#if 0
if (link == NULL) return;
if (listbase == NULL) return;
+#endif
link->next = NULL;
link->prev = listbase->last;
@@ -696,8 +702,12 @@ static void remlink(volatile localListBase *listbase, void *vlink)
{
struct localLink *link = vlink;
+ /* for a generic API error checks here is fine but
+ * the limited use here they will never be NULL */
+#if 0
if (link == NULL) return;
if (listbase == NULL) return;
+#endif
if (link->next) link->next->prev = link->prev;
if (link->prev) link->prev->next = link->next;