On 05/26/2013 01:31 PM, Simon Glass wrote:
> Hi Stephen,
> 
> On Thu, May 23, 2013 at 3:09 PM, Stephen Warren <swar...@wwwdotorg.org
> <mailto:swar...@wwwdotorg.org>> wrote:
> 
>     From: Stephen Warren <swar...@nvidia.com <mailto:swar...@nvidia.com>>
> 
>     We know the exact property names that the code wants to process. Look
>     these up directly with fdt_get_property(), rather than iterating over
>     all properties within the node, and checking each property's name, in
>     a convoluted fashion, against the expected name.
>     +       plain_keycode = create_keymap(config, (u32 *)prop->data,
>     +               proplen, KEY_FN, &config->fn_pos);
> 
> Probably don't need plain_keycode variable at all.

This is required because the variable is passed to free() later, and
config->plain_keycode is marked const, whereas free isn't prototyped to
take a const. I figured that it was simplest to use a separate variable
here rather than cast away the const when calling free(). Now, if C had
const_cast<>, then I would have made a different decision:-)
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to