Dear Simon Glass,

In message <[email protected]> you wrote:
> From: Vincent Palatin <[email protected]>
> 
> The name is already copied when we memopy the whole structure.

memopy?

> --- a/common/stdio.c
> +++ b/common/stdio.c
> @@ -135,7 +135,6 @@ struct stdio_dev* stdio_clone(struct stdio_dev *dev)
>               return NULL;
>  
>       memcpy(_dev, dev, sizeof(struct stdio_dev));
> -     strncpy(_dev->name, dev->name, 16);

_dev contains just the pointer, not the data, so why can we omit
copying the data?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
"It is better for civilization to be going down the drain than to  be
coming up it."                                          - Henry Allen
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to