From: Andre Noll Date: Wed, 23 Aug 2006 10:19:13 +0000 (+0200) Subject: osx_write.c: trivial simplifications X-Git-Tag: v0.2.14~35 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=64e50f750cb3fb64af10384d323a84d4702c982d;p=paraslash.git osx_write.c: trivial simplifications (a) Kill an outdated comment (b) free(NULL) is okay --- diff --git a/osx_write.c b/osx_write.c index 7e825f71..885c05d1 100644 --- a/osx_write.c +++ b/osx_write.c @@ -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; }