diff options
author | 2002-06-19 07:12:41 +0000 | |
---|---|---|
committer | 2002-06-19 07:12:41 +0000 | |
commit | d4d0166174bae88b3e2143312359938e65562e86 (patch) | |
tree | c0512bb7edeaa25c3366a6bcf88e5e518ba88209 /lib/libusbhid/usage.c | |
parent | kill sprintf (diff) | |
download | wireguard-openbsd-d4d0166174bae88b3e2143312359938e65562e86.tar.xz wireguard-openbsd-d4d0166174bae88b3e2143312359938e65562e86.zip |
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; } |