summaryrefslogtreecommitdiffstats
path: root/man/hwdb-usb-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'man/hwdb-usb-device.c')
-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)