From: Tilman Sauerbeck Date: Fri, 18 Aug 2006 19:06:03 +0000 (+0200) Subject: Code cleanup. X-Git-Tag: ruby-vorbistagger-0.0.1~6 X-Git-Url: http://git.code-monkey.de/?p=ruby-vorbistagger.git;a=commitdiff_plain;h=3e0e120ba38a9bf52f3bb5cf47106919440c2452;hp=e04f6c2b90c9501fc613a130ee90863cc84f4a98 Code cleanup. --- diff --git a/ext/vcedit.c b/ext/vcedit.c index 414d6d0..f3ad2c9 100644 --- a/ext/vcedit.c +++ b/ext/vcedit.c @@ -199,12 +199,12 @@ _commentheader_out (vcedit_state *s, ogg_packet *op) oggpack_write (&opb, 1, 1); - op->packet = _ogg_malloc (oggpack_bytes (&opb)); - memcpy (op->packet, opb.buffer, oggpack_bytes (&opb)); - op->bytes = oggpack_bytes (&opb); - op->b_o_s = 0; - op->e_o_s = 0; + op->packet = _ogg_malloc (op->bytes); + + memcpy (op->packet, opb.buffer, op->bytes); + + op->b_o_s = op->e_o_s = 0; op->granulepos = 0; oggpack_writeclear (&opb);