
3 Nov
2012
3 Nov
'12
4:31 p.m.
Dear Simon Glass,
In message 1351902453-27956-6-git-send-email-sjg@chromium.org you wrote:
From: Vincent Palatin vpalatin@chromium.org
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: wd@denx.de
"It is better for civilization to be going down the drain than to be
coming up it." - Henry Allen