[vlc-devel] [PATCH] libvlc API: Add equalizer to audio.c
cmathe at actech-innovation.com
Tue Jul 7 16:29:39 CEST 2009
Le mardi 07 juillet 2009 à 12:06 +0200, Rémi Denis-Courmont a écrit :
> >> The asprintf() error handling looks broken to me.
> > it is not. the asprintf line is (comes from equalizer.c):
> > asprintf( &psz, "%s %lld.%07llu", psz_newbands ? psz_newbands : "",
> > d.quot, d.rem ) == -1 )
> > so we need an unsigned long for d.rem but it is said in man :
> > EXAMPLE
> > After
> > div_t q = div(-5, 3);
> > the values q.quot and q.rem are -1 and -2, respectively.
> > this is why we need it. The sign is changed before and after lldiv to
> > have not negative d.rem value and to conserve the number sign
> Sorry, I do not see the relevance of your rant on the (idiotic indeed)
> semantics of the American integer division, to my complaints on the _error_
> handling of the asprintf() call.
I don't understand what is the problem with asprintf().
More information about the vlc-devel