[vlc-devel] RE : [PATCH] -- skins2 (more corrections)
Rémi Denis-Courmont
rem at videolan.org
Mon Mar 16 22:15:31 CET 2009
Le lundi 16 mars 2009 22:53:37 brezhoneg1, vous avez écrit :
> > I must say that...
> >
> > if( !b_playlist_locked ) PL_UNLOCK;
> >
> > +
> > + if( b_playlist_locked ) PL_UNLOCK;
> >
> > ...that smells utmostly fishy to me.
>
> The function playlist_CurrentInput( ) automatically holds the playlist.
> Since this lock may already be held before entering the function, this
> results in EDEADLCK(35).
That's beside the point. The point is that this code pattern is fishy:
if (a) b();
if (!a) b();
It might be correct, but it is obviously equivalent to:
b();
And hence, I take it as a strong hint that the author has not looked at
the "big picture" while writing the patch. While that happens in my code as
well but it's not an excuse.
--
Rémi Denis-Courmont
http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary
More information about the vlc-devel
mailing list