summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hebb <tommyhebb@gmail.com>2021-04-04 11:47:10 -0700
committerThomas Hebb <tommyhebb@gmail.com>2021-04-04 11:47:10 -0700
commit08a12f83104c5772271908049cb8c5f06cbb0020 (patch)
treefc56c99065db4e3e368bd99bc455583d9af307a7
parent1a3f8b662e3cce40768d45be3dd2c9fb93808065 (diff)
downloadusbutils-08a12f83104c5772271908049cb8c5f06cbb0020.tar.gz
lsusb: Fix buffer size copy/paste error
When I added these calls, I mistakenly passed them all the size of the vendor buffer instead of the buffers they actually fill. As it happens, all the sizes are the same, so there's no correctness issue, but we should still fix the issue for code clarity and ease of modification. Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
-rw-r--r--lsusb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lsusb.c b/lsusb.c
index 931fb57..f686557 100644
--- a/lsusb.c
+++ b/lsusb.c
@@ -286,9 +286,9 @@ static void dump_device(
descriptor->bDeviceSubClass, descriptor->bDeviceProtocol);
if (get_sysfs_name(sysfs_name, sizeof(sysfs_name), dev) >= 0) {
- read_sysfs_prop(mfg, sizeof(vendor), sysfs_name, "manufacturer");
- read_sysfs_prop(prod, sizeof(vendor), sysfs_name, "product");
- read_sysfs_prop(serial, sizeof(vendor), sysfs_name, "serial");
+ read_sysfs_prop(mfg, sizeof(mfg), sysfs_name, "manufacturer");
+ read_sysfs_prop(prod, sizeof(prod), sysfs_name, "product");
+ read_sysfs_prop(serial, sizeof(serial), sysfs_name, "serial");
}
printf("Device Descriptor:\n"