[MPlayer-cvslog] r35626 - trunk/libaf/af_export.c

Xidorn Quan quanxunzhen at gmail.com
Sun Dec 9 09:00:47 CET 2012


On Sun, Dec 9, 2012 at 3:17 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de>wrote:

> On 9 Dec 2012, at 03:22, upsuper <subversion at mplayerhq.hu> wrote:
>
> > Author: upsuper
> > Date: Sun Dec  9 03:22:08 2012
> > New Revision: 35626
> >
> > Log:
> > Fix a wrong condition.
>
> Those conditions were exactly right (allowing to dynamically allocate the
> buf array), they are completely pointless the way you changed them since
> free () handles it.
>

I don't agree with you for the point that the conditions were right.

The definition of s->buf is "void *buf[AF_NCH]" which means that buf
is an array which contains AF_NCH void pointers. Therefore, the size
of s->buf is immutable, and its address is always equal to that of
the struct plus an offset, which indicates that the value of s->buf
here can never equal to a non-zero value except s has a specific
value.

However, you are right that for the current code, the conditions can
be removed directly.


> I don't mind if you want to remove them, but we shouldn't have pointless
> clutter.
>

-- 
Xidorn Quan
GnuPG fingerprint: 6F1E DF9A D250 7505 63E2  345E 7570 8D3F 7C9A 1209


More information about the MPlayer-cvslog mailing list