Dear Simon Glass,

In message <1429146849-11994-3-git-send-email-...@chromium.org> you wrote:
> Unfortunately memset() is not always available, so provide a substitute when
> needed.

> +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBGENERIC_SUPPORT)
>       memset((void *)gd, '\0', sizeof(*gd));
> +#else
> +     int *ptr = (int *)gd;
> +     int *end = (int *)(gd + 1);
> +
> +     while (ptr < end)
> +             *ptr++ = 0;
> +#endif

Please don't declare variables in the middle of the code.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Command, n.:
            Statement presented by a human and accepted by a computer
in such a manner as to make the human feel as if he is in control.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to