[MPlayer-cvslog] r33205 - trunk/gui/util/bitmap.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Apr 4 18:58:50 CEST 2011

On Mon, Apr 04, 2011 at 03:49:57PM +0200, ib wrote:
> Move variable definitions at top of function.

Keeping the declarations inside the block where they are used can
often improve readability.
E.g. it makes it easy to check that that you can safely clobber
the contents because you know that nobody beyond the end of the
block is using it.

>      if (out->Image == NULL) {
>          mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", out->ImageSize);
>          return 0;
>      } else {

Though in this case getting rid of the else-block completely
probably helps readability more.

More information about the MPlayer-cvslog mailing list