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 7e825f7..885c05d 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;
        }