diff libdirac_libschro.c @ 10055:fdb318d12314 libavcodec

Simplify 'if' condition statements. Drop useless '!= 0' from 'exp != 0', replace 'exp == 0' by '!exp'.
author diego
date Sat, 15 Aug 2009 11:02:50 +0000
parents e9d9d946f213
children 646065f63290
line wrap: on
line diff
--- a/libdirac_libschro.c	Sat Aug 15 09:12:58 2009 +0000
+++ b/libdirac_libschro.c	Sat Aug 15 11:02:50 2009 +0000
@@ -86,12 +86,12 @@
     FfmpegDiracSchroQueueElement *p_new =
                              av_mallocz(sizeof(FfmpegDiracSchroQueueElement));
 
-    if (p_new == NULL)
+    if (!p_new)
         return -1;
 
     p_new->data = p_data;
 
-    if (queue->p_head == NULL)
+    if (!queue->p_head)
         queue->p_head = p_new;
     else
         queue->p_tail->next = p_new;
@@ -105,7 +105,7 @@
 {
     FfmpegDiracSchroQueueElement *top = queue->p_head;
 
-    if (top != NULL) {
+    if (top) {
         void *data = top->data;
         queue->p_head = queue->p_head->next;
         --queue->size;