diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-03-17 19:17:00 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-03-17 19:17:00 +0000 |
commit | 61bb647481e36bb3a55aa63edc3cc4fa18c8a2ea (patch) | |
tree | 78a315d556cccb6c1c26d54d9f1dbb0a3e3dad7a /lib/libcurses/trace/lib_tracemse.c | |
parent | 5934993814e647644671dd601072bdd92890335a (diff) |
use snprintf throughout
Diffstat (limited to 'lib/libcurses/trace/lib_tracemse.c')
-rw-r--r-- | lib/libcurses/trace/lib_tracemse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcurses/trace/lib_tracemse.c b/lib/libcurses/trace/lib_tracemse.c index c92e4821eb0..fe0555eb07f 100644 --- a/lib/libcurses/trace/lib_tracemse.c +++ b/lib/libcurses/trace/lib_tracemse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_tracemse.c,v 1.2 2001/01/22 18:01:58 millert Exp $ */ +/* $OpenBSD: lib_tracemse.c,v 1.3 2003/03/17 19:16:59 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,2000 Free Software Foundation, Inc. * @@ -48,8 +48,8 @@ _tracemouse(MEVENT const *ep) { static char buf[80]; - (void) sprintf(buf, "id %2d at (%2d, %2d, %2d) state %4lx = {", - ep->id, ep->x, ep->y, ep->z, ep->bstate); + (void) snprintf(buf, sizeof(buf), "id %2d at (%2d, %2d, %2d) state %4lx = {", + ep->id, ep->x, ep->y, ep->z, ep->bstate); #define SHOW(m, s) if ((ep->bstate & m)==m) {strcat(buf,s); strcat(buf, ", ");} SHOW(BUTTON1_RELEASED, "release-1") |