[MPlayer-cvslog] r33059 - trunk/gui/mplayer/gui_common.c

Clément Bœsch ubitux at gmail.com
Tue Mar 8 22:08:12 CET 2011


On Tue, Mar 08, 2011 at 09:56:51PM +0100, ib wrote:
> Author: ib
> Date: Tue Mar  8 21:56:51 2011
> New Revision: 33059
> 
> Log:
> Fix several issues with Translate().
> 
> 1. The "Unsafe!" comment has been removed, because the strings passed
>    to the function are strcpy'd.
> 
> 2. The needless memsets (one of which with wrong size) have been removed
>    in favor of a sufficiently simple initialization of trbuf.
> 

Btw, what's the point of having trbuf static if it was zero'ed?

> 3. The array indices are unsigned now, and the manual optimization of
>    having strlen() outside the for loop has been removed in favor of
>    optimization performed by the compiler.
> 

I'm not convinced this will ever be optimized. Also, it could mean, from a
developer point of view, that the length could change during the loop. The
function being pretty big, it's hard to get sure if it is or not.

> [...]

-- 
Clément B.


More information about the MPlayer-cvslog mailing list