projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64e50f7
)
osx_write.c: Use realloc() instead of free() and malloc()
author
Andre Noll
<maan@congo.fml.local>
Wed, 23 Aug 2006 10:26:18 +0000
(12:26 +0200)
committer
Andre Noll
<maan@congo.fml.local>
Wed, 23 Aug 2006 10:26:18 +0000
(12:26 +0200)
Also, kill a silly comment.
osx_write.c
patch
|
blob
|
history
diff --git
a/osx_write.c
b/osx_write.c
index 885c05d1a535a0b3b4eb65e894bd73e2d5d038bb..39af500077a939a28109e7535868560487f63b1d 100644
(file)
--- a/
osx_write.c
+++ b/
osx_write.c
@@
-105,12
+105,7
@@
static void fill_buffer(osx_buffer *b, short *source, long size)
return;
PARA_INFO_LOG("%ld\n", size);
if (b->size != size) {
- /*
- * Hey! What's that? Coudn't this buffer size be fixed
- * once (well, perhaps we just didn't allocate it yet)
- */
- free(b->buffer);
- b->buffer = malloc(size * sizeof(float));
+ b->buffer = para_realloc(b->buffer, size * sizeof(float));
b->size = size;
}
dest = b->buffer;