summaryrefslogtreecommitdiffstats
path: root/man/hwdb-usb-device.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:19:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:19:38 +0000
commit68aafb2658b298c23ed1725b69f5474bee5ee38c (patch)
treec383770976489dbeeef85ef7bc668da64a242b14 /man/hwdb-usb-device.c
parentAdding upstream version 252.23. (diff)
downloadsystemd-68aafb2658b298c23ed1725b69f5474bee5ee38c.tar.xz
systemd-68aafb2658b298c23ed1725b69f5474bee5ee38c.zip
Adding upstream version 252.25.upstream/252.25
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--man/hwdb-usb-device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/man/hwdb-usb-device.c b/man/hwdb-usb-device.c
index 19a5db8..facd8c4 100644
--- a/man/hwdb-usb-device.c
+++ b/man/hwdb-usb-device.c
@@ -2,16 +2,16 @@
#include <stdio.h>
#include <stdint.h>
-#include <sd-hwdb.h>
+#include <systemd/sd-hwdb.h>
int print_usb_properties(uint16_t vid, uint16_t pid) {
- char match[STRLEN("usb:vp") + DECIMAL_STR_MAX(uint16_t) * 2];
+ char match[128];
sd_hwdb *hwdb;
const char *key, *value;
int r;
/* Match this USB vendor and product ID combination */
- xsprintf(match, "usb:v%04Xp%04X", vid, pid);
+ snprintf(match, sizeof match, "usb:v%04Xp%04X", vid, pid);
r = sd_hwdb_new(&hwdb);
if (r < 0)