summaryrefslogtreecommitdiffstats
path: root/man/hwdb-usb-device.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:54:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:54:54 +0000
commitaf2a7ac568af7b8ecf1002023dd9d07135c3c9c2 (patch)
tree581ab49f856374f88fabfc43ba54969edbe67316 /man/hwdb-usb-device.c
parentReleasing progress-linux version 255.4-1~progress7.99u1. (diff)
downloadsystemd-af2a7ac568af7b8ecf1002023dd9d07135c3c9c2.tar.xz
systemd-af2a7ac568af7b8ecf1002023dd9d07135c3c9c2.zip
Merging upstream version 255.5.
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)