summaryrefslogtreecommitdiff
path: root/udevdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'udevdb.c')
-rw-r--r--udevdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udevdb.c b/udevdb.c
index b12f5b3d46..01df3ba7e1 100644
--- a/udevdb.c
+++ b/udevdb.c
@@ -184,7 +184,7 @@ static int find_device_by_name(char *path, struct udevice *dev)
if (strncmp(dev->name, find_name, sizeof(dev->name)) == 0) {
memcpy(find_dev, dev, sizeof(struct udevice));
- strnfieldcpy(find_path, path, NAME_SIZE);
+ strfieldcpymax(find_path, path, NAME_SIZE);
find_found = 1;
/* stop search */
return 1;
@@ -198,7 +198,7 @@ static int find_device_by_name(char *path, struct udevice *dev)
continue;
memcpy(find_dev, dev, sizeof(struct udevice));
- strnfieldcpy(find_path, path, NAME_SIZE);
+ strfieldcpymax(find_path, path, NAME_SIZE);
find_found = 1;
return 1;
}