diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-19 07:12:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-19 07:12:43 +0000 |
commit | 36cb109beb9efb72a6d48ac7127a9f379657de1e (patch) | |
tree | b109e47cd2026a61932f39e6c8296632a44e5350 /lib/libusbhid/usage.c | |
parent | 8be025d256ee6bb72fd3f36daa2a1adc4b8011f1 (diff) |
use more snprintf
Diffstat (limited to 'lib/libusbhid/usage.c')
-rw-r--r-- | lib/libusbhid/usage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c index be6cf49a180..67c9b113e49 100644 --- a/lib/libusbhid/usage.c +++ b/lib/libusbhid/usage.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usage.c,v 1.3 2002/06/11 05:20:19 jsyn Exp $ */ +/* $OpenBSD: usage.c,v 1.4 2002/06/19 07:12:42 deraadt Exp $ */ /* $NetBSD: usage.c,v 1.1 2001/12/28 17:45:27 augustss Exp $ */ /* @@ -163,7 +163,7 @@ hid_usage_page(int i) for (k = 0; k < npages; k++) if (pages[k].usage == i) return pages[k].name; - sprintf(b, "0x%04x", i); + snprintf(b, sizeof b, "0x%04x", i); return b; } @@ -191,7 +191,7 @@ hid_usage_in_page(unsigned int u) return pages[k].page_contents[j].name; } bad: - sprintf(b, "0x%04x", i); + snprintf(b, sizeof b, "0x%04x", i); return b; } |