mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
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 <vpalatin@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
75b3afc665
commit
6a135efcd0
1 changed files with 0 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue