summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/regex/debug.c
diff options
context:
space:
mode:
authorderaadt <>2003-07-31 21:48:04 +0000
committerderaadt <>2003-07-31 21:48:04 +0000
commit33c506bfed3ead4cc96819ce600895082c214755 (patch)
treef684ac5f268a986ffa67596e223c418beaac533a /src/regress/lib/libc/regex/debug.c
parent1e17357c09b2a156a0fa1407b68c4158394b9d7e (diff)
downloadopenbsd-33c506bfed3ead4cc96819ce600895082c214755.tar.gz
openbsd-33c506bfed3ead4cc96819ce600895082c214755.tar.bz2
openbsd-33c506bfed3ead4cc96819ce600895082c214755.zip
various cleanups; david says results are same
Diffstat (limited to 'src/regress/lib/libc/regex/debug.c')
-rw-r--r--src/regress/lib/libc/regex/debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/regress/lib/libc/regex/debug.c b/src/regress/lib/libc/regex/debug.c
index 7834e970c7..11129e7249 100644
--- a/src/regress/lib/libc/regex/debug.c
+++ b/src/regress/lib/libc/regex/debug.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: debug.c,v 1.3 2001/01/29 02:05:43 niklas Exp $ */ 1/* $OpenBSD: debug.c,v 1.4 2003/07/31 21:48:03 deraadt Exp $ */
2/* $NetBSD: debug.c,v 1.2 1995/04/20 22:39:42 cgd Exp $ */ 2/* $NetBSD: debug.c,v 1.2 1995/04/20 22:39:42 cgd Exp $ */
3 3
4#include <stdio.h> 4#include <stdio.h>
@@ -238,8 +238,8 @@ int ch;
238 static char buf[10]; 238 static char buf[10];
239 239
240 if (isprint(ch) || ch == ' ') 240 if (isprint(ch) || ch == ' ')
241 sprintf(buf, "%c", ch); 241 snprintf(buf, sizeof buf, "%c", ch);
242 else 242 else
243 sprintf(buf, "\\%o", ch); 243 snprintf(buf, sizeof buf, "\\%o", ch);
244 return(buf); 244 return(buf);
245} 245}