]> git.tue.mpg.de Git - paraslash.git/commitdiff
osx_write.c: trivial simplifications
authorAndre Noll <maan@congo.fml.local>
Wed, 23 Aug 2006 10:19:13 +0000 (12:19 +0200)
committerAndre Noll <maan@congo.fml.local>
Wed, 23 Aug 2006 10:19:13 +0000 (12:19 +0200)
(a) Kill an outdated comment
(b) free(NULL) is okay

osx_write.c

index 7e825f714c515ab1f75a64988eaf570bfb16c9cd..885c05d1a535a0b3b4eb65e894bd73e2d5d038bb 100644 (file)
@@ -93,7 +93,6 @@ static void init_buffers(struct private_osx_write_data *powd)
                (*ptrptr)->remaining = 0;
                (*ptrptr)->buffer = NULL;
                ptrptr = &(*ptrptr)->next;
-               /* This buffer is ready for filling (of course, it is empty!) */
        }
        *ptrptr = powd->from = powd->to;
 }
@@ -110,8 +109,7 @@ static void fill_buffer(osx_buffer *b, short *source, long size)
                 * Hey! What's that? Coudn't this buffer size be fixed
                 * once (well, perhaps we just didn't allocate it yet)
                 */
-               if (b->buffer)
-                       free(b->buffer);
+               free(b->buffer);
                b->buffer = malloc(size * sizeof(float));
                b->size = size;
        }