Module Name: src Committed By: jruoho Date: Thu Jun 2 12:42:28 UTC 2011
Modified Files: src/tests/lib/libc/gen: t_sethostname.c Log Message: Cleanup. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_sethostname.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libc/gen/t_sethostname.c diff -u src/tests/lib/libc/gen/t_sethostname.c:1.1 src/tests/lib/libc/gen/t_sethostname.c:1.2 --- src/tests/lib/libc/gen/t_sethostname.c:1.1 Thu Jun 2 12:15:33 2011 +++ src/tests/lib/libc/gen/t_sethostname.c Thu Jun 2 12:42:27 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_sethostname.c,v 1.1 2011/06/02 12:15:33 jruoho Exp $ */ +/* $NetBSD: t_sethostname.c,v 1.2 2011/06/02 12:42:27 jruoho Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_sethostname.c,v 1.1 2011/06/02 12:15:33 jruoho Exp $"); +__RCSID("$NetBSD: t_sethostname.c,v 1.2 2011/06/02 12:42:27 jruoho Exp $"); #include <sys/param.h> @@ -67,6 +67,8 @@ ATF_REQUIRE(gethostname(name, sizeof(name)) == 0); ATF_REQUIRE(strcmp(hosts[i], name) == 0); } + + (void)sethostname(host, sizeof(host)); } ATF_TC_CLEANUP(sethostname_basic, tc)