svn commit: r312108 - head/contrib/netbsd-tests/lib/libc/gen/posix_spawn

Ngie Cooper ngie at FreeBSD.org
Sat Jan 14 03:54:24 UTC 2017


Author: ngie
Date: Sat Jan 14 03:54:23 2017
New Revision: 312108
URL: https://svnweb.freebsd.org/changeset/base/312108

Log:
  Delete trailing whitespace and use __arraycount instead of nitems in contrib code
  
  MFC after:	1 week

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c	Sat Jan 14 02:29:25 2017	(r312107)
+++ head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c	Sat Jan 14 03:54:23 2017	(r312108)
@@ -60,16 +60,16 @@ get_different_scheduler(void)
 
 	/* get current schedule policy */
 	scheduler = sched_getscheduler(0);
-	for (i = 0; i < nitems(schedulers); i++) {
+	for (i = 0; i < __arraycount(schedulers); i++) {
 		if (schedulers[i] == scheduler)
 			break;
 	}
-	ATF_REQUIRE_MSG(i < nitems(schedulers),
+	ATF_REQUIRE_MSG(i < __arraycount(schedulers),
 	    "Unknown current scheduler %d", scheduler);
-					
+
 	/* new scheduler */
 	i++;
-	if (i >= nitems(schedulers))
+	if (i >= __arraycount(schedulers))
 		i = 0;
 	return schedulers[i];
 }
@@ -85,7 +85,7 @@ get_different_priority(int scheduler)
 
 	sched_getparam(0, &param);
 	priority = param.sched_priority;
-	
+
 	/*
 	 * Change numerical value of the priority, to ensure that it
 	 * was set for the spawned child.
@@ -127,7 +127,7 @@ ATF_TC_BODY(t_spawnattr, tc)
 	scheduler = get_different_scheduler();
 	priority = get_different_priority(scheduler);
 	sp.sched_priority = priority;
-	
+
 	sigemptyset(&sig);
 	sigaddset(&sig, SIGUSR1);
 


More information about the svn-src-all mailing list