diff options
author | Thomas Hebb <tommyhebb@gmail.com> | 2021-04-04 11:47:10 -0700 |
---|---|---|
committer | Thomas Hebb <tommyhebb@gmail.com> | 2021-04-04 11:47:10 -0700 |
commit | 08a12f83104c5772271908049cb8c5f06cbb0020 (patch) | |
tree | fc56c99065db4e3e368bd99bc455583d9af307a7 | |
parent | 1a3f8b662e3cce40768d45be3dd2c9fb93808065 (diff) | |
download | usbutils-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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" |