From: Vincent Palatin Date: Wed, 5 Dec 2012 14:46:32 +0000 (+0000) Subject: stdio: remove useless strncpy X-Git-Tag: v2013.01-rc2~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6a135efcd0f1a2e0f9e5f24fa7a0b578963c55aa;p=u-boot stdio: remove useless strncpy The name is already copied when we memcpy() the whole structure. This is because struct stdio_dev has this field: char name[16]; /* Device name */ So the data is inline, rather than being a pointer. Signed-off-by: Vincent Palatin Signed-off-by: Simon Glass --- diff --git a/common/stdio.c b/common/stdio.c index 9f48e5f503..97ff9cf4a6 100644 --- 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); return _dev; }