summaryrefslogtreecommitdiff
path: root/tests/lib/libc/stdlib
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2012-03-15 02:02:20 +0000
committerjoerg <joerg@NetBSD.org>2012-03-15 02:02:20 +0000
commit85ebf103375262b27fffdad71fc44b299417f3ff (patch)
treee1ed527b316eb219b289e5214b93f707880a0ca1 /tests/lib/libc/stdlib
parentfa80b16724ce0bd6438d61e3a11855ca361f10d7 (diff)
Add __printflike attribution to use vprintf and friends with an argument
as format string.
Diffstat (limited to 'tests/lib/libc/stdlib')
-rw-r--r--tests/lib/libc/stdlib/t_getenv_thread.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/tests/lib/libc/stdlib/t_getenv_thread.c b/tests/lib/libc/stdlib/t_getenv_thread.c
index 4cc95433ab4..d935629339e 100644
--- a/tests/lib/libc/stdlib/t_getenv_thread.c
+++ b/tests/lib/libc/stdlib/t_getenv_thread.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_getenv_thread.c,v 1.1 2011/07/15 13:54:31 jruoho Exp $ */
+/* $NetBSD: t_getenv_thread.c,v 1.2 2012/03/15 02:02:23 joerg Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getenv_thread.c,v 1.1 2011/07/15 13:54:31 jruoho Exp $");
+__RCSID("$NetBSD: t_getenv_thread.c,v 1.2 2012/03/15 02:02:23 joerg Exp $");
#include <atf-c.h>
#include <errno.h>
@@ -140,13 +140,9 @@ thread_unsetenv(void *arg)
ATF_TC(getenv_r_thread);
ATF_TC_HEAD(getenv_r_thread, tc)
{
- char timeout[32];
atf_tc_set_md_var(tc, "descr", "Test getenv_r(3) with threads");
-
- (void)snprintf(timeout, sizeof(timeout), "%d", THREADED_RUN_TIME + 5);
-
- atf_tc_set_md_var(tc, "timeout", timeout);
+ atf_tc_set_md_var(tc, "timeout", "%d", THREADED_RUN_TIME + 5);
}
ATF_TC_BODY(getenv_r_thread, tc)
@@ -170,13 +166,8 @@ ATF_TC_BODY(getenv_r_thread, tc)
ATF_TC(putenv_thread);
ATF_TC_HEAD(putenv_thread, tc)
{
- char timeout[32];
-
atf_tc_set_md_var(tc, "descr", "Test concurrent access by putenv(3)");
-
- (void)snprintf(timeout, sizeof(timeout), "%d", THREADED_RUN_TIME + 5);
-
- atf_tc_set_md_var(tc, "timeout", timeout);
+ atf_tc_set_md_var(tc, "timeout", "%d", THREADED_RUN_TIME + 5);
}
ATF_TC_BODY(putenv_thread, tc)
@@ -200,13 +191,8 @@ ATF_TC_BODY(putenv_thread, tc)
ATF_TC(setenv_thread);
ATF_TC_HEAD(setenv_thread, tc)
{
- char timeout[32];
-
atf_tc_set_md_var(tc, "descr", "Test concurrent access by setenv(3)");
-
- (void)snprintf(timeout, sizeof(timeout), "%d", THREADED_RUN_TIME + 5);
-
- atf_tc_set_md_var(tc, "timeout", timeout);
+ atf_tc_set_md_var(tc, "timeout", "%d", THREADED_RUN_TIME + 5);
}
ATF_TC_BODY(setenv_thread, tc)
@@ -230,13 +216,8 @@ ATF_TC_BODY(setenv_thread, tc)
ATF_TC(unsetenv_thread);
ATF_TC_HEAD(unsetenv_thread, tc)
{
- char timeout[32];
-
atf_tc_set_md_var(tc, "descr", "Test unsetenv(3) with threads");
-
- (void)snprintf(timeout, sizeof(timeout), "%d", THREADED_RUN_TIME + 5);
-
- atf_tc_set_md_var(tc, "timeout", timeout);
+ atf_tc_set_md_var(tc, "timeout", "%d", THREADED_RUN_TIME + 5);
}
ATF_TC_BODY(unsetenv_thread, tc)