summaryrefslogtreecommitdiff
path: root/regress/lib/libpthread/stdio/stdio.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-07-31 21:48:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-07-31 21:48:11 +0000
commit8deaa5cb1bdad9c4505896866607f4272b307e9a (patch)
treef2b66a24b21f1edc23c12fdb15eab63814fc036d /regress/lib/libpthread/stdio/stdio.c
parent1472e2b5666bd9c64d37882b7cfb2596d9352eb3 (diff)
various cleanups; david says results are same
Diffstat (limited to 'regress/lib/libpthread/stdio/stdio.c')
-rw-r--r--regress/lib/libpthread/stdio/stdio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/regress/lib/libpthread/stdio/stdio.c b/regress/lib/libpthread/stdio/stdio.c
index 9f3246d516b..b2dd7c96ef3 100644
--- a/regress/lib/libpthread/stdio/stdio.c
+++ b/regress/lib/libpthread/stdio/stdio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdio.c,v 1.1 2001/08/15 14:37:16 fgsch Exp $ */
+/* $OpenBSD: stdio.c,v 1.2 2003/07/31 21:48:06 deraadt Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996 by Chris Provenzano and contributors,
* proven@mit.edu All rights reserved.
@@ -45,8 +45,8 @@ char * dir_name = SRCDIR;
char * fullname;
/* Test fopen()/ftell()/getc() */
-void
-test_1()
+static void
+test_1(void)
{
struct stat statbuf;
FILE * fp;
@@ -66,8 +66,8 @@ test_1()
}
/* Test fopen()/fclose() */
-void
-test_2()
+static void
+test_2(void)
{
FILE *fp1, *fp2;
@@ -81,7 +81,7 @@ test_2()
}
/* Test sscanf()/sprintf() */
-void
+static void
test_3(void)
{
char * str = "10 4.53";
@@ -92,12 +92,12 @@ test_3(void)
ASSERT(sscanf(str, "%d %lf", &i, &d) == 2);
/* Should have a check */
- sprintf(buf, "%d %2.2f", i, d);
+ snprintf(buf, sizeof buf, "%d %2.2f", i, d);
ASSERT(strcmp(buf, str) == 0);
}
int
-main()
+main(int argc, char *argv[])
{
CHECKn(fullname = malloc (strlen (dir_name) + strlen (base_name) + 2));