diff options
Diffstat (limited to 'src/regress/lib/libc/regex/debug.c')
-rw-r--r-- | src/regress/lib/libc/regex/debug.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/regress/lib/libc/regex/debug.c b/src/regress/lib/libc/regex/debug.c index 861f550611..11129e7249 100644 --- a/src/regress/lib/libc/regex/debug.c +++ b/src/regress/lib/libc/regex/debug.c | |||
@@ -1,3 +1,4 @@ | |||
1 | /* $OpenBSD: debug.c,v 1.4 2003/07/31 21:48:03 deraadt Exp $ */ | ||
1 | /* $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 $ */ |
2 | 3 | ||
3 | #include <stdio.h> | 4 | #include <stdio.h> |
@@ -218,7 +219,7 @@ FILE *d; | |||
218 | fprintf(d, ">"); | 219 | fprintf(d, ">"); |
219 | break; | 220 | break; |
220 | default: | 221 | default: |
221 | fprintf(d, "!%d(%d)!", OP(*s), opnd); | 222 | fprintf(d, "!%ld(%ld)!", (long)OP(*s), (long)opnd); |
222 | break; | 223 | break; |
223 | } | 224 | } |
224 | if (!done) | 225 | if (!done) |
@@ -237,8 +238,8 @@ int ch; | |||
237 | static char buf[10]; | 238 | static char buf[10]; |
238 | 239 | ||
239 | if (isprint(ch) || ch == ' ') | 240 | if (isprint(ch) || ch == ' ') |
240 | sprintf(buf, "%c", ch); | 241 | snprintf(buf, sizeof buf, "%c", ch); |
241 | else | 242 | else |
242 | sprintf(buf, "\\%o", ch); | 243 | snprintf(buf, sizeof buf, "\\%o", ch); |
243 | return(buf); | 244 | return(buf); |
244 | } | 245 | } |