Skip to content
Snippets Groups Projects
Commit 6a135efc authored by Vincent Palatin's avatar Vincent Palatin Committed by Tom Rini
Browse files

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: default avatarVincent Palatin <vpalatin@chromium.org>

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 75b3afc6
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,6 @@ struct stdio_dev* stdio_clone(struct stdio_dev *dev) ...@@ -135,7 +135,6 @@ struct stdio_dev* stdio_clone(struct stdio_dev *dev)
return NULL; return NULL;
memcpy(_dev, dev, sizeof(struct stdio_dev)); memcpy(_dev, dev, sizeof(struct stdio_dev));
strncpy(_dev->name, dev->name, 16);
return _dev; return _dev;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment