Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net/bpf Add __RCSID and and make a couple of stylistic...
details: https://anonhg.NetBSD.org/src/rev/2e0ba3c52783
branches: trunk
changeset: 781002:2e0ba3c52783
user: alnsn <alnsn%NetBSD.org@localhost>
date: Tue Aug 14 19:40:30 2012 +0000
description:
Add __RCSID and and make a couple of stylistic changes.
diffstat:
tests/net/bpf/t_bpf.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (49 lines):
diff -r 1d674f28fb8c -r 2e0ba3c52783 tests/net/bpf/t_bpf.c
--- a/tests/net/bpf/t_bpf.c Tue Aug 14 19:13:54 2012 +0000
+++ b/tests/net/bpf/t_bpf.c Tue Aug 14 19:40:30 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_bpf.c,v 1.4 2012/01/13 16:28:44 christos Exp $ */
+/* $NetBSD: t_bpf.c,v 1.5 2012/08/14 19:40:30 alnsn Exp $ */
/*-
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -24,6 +24,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_bpf.c,v 1.5 2012/08/14 19:40:30 alnsn Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -117,8 +119,10 @@
vm_page_size = sysconf(_SC_PAGE_SIZE);
ATF_REQUIRE(iov_max > 1 && vm_page_size > 1);
- /* Minimize memory consumption by using many iovecs
- * all pointing to one memory region */
+ /*
+ * Minimize memory consumption by using many iovecs
+ * all pointing to one memory region.
+ */
iov = calloc(iov_max, sizeof(struct iovec));
ATF_REQUIRE(iov != NULL);
@@ -129,7 +133,7 @@
ATF_REQUIRE(iov[0].iov_base != MAP_FAILED);
iovlen = 1;
- while(sz + iov[0].iov_len <= total)
+ while (sz + iov[0].iov_len <= total)
{
iov[iovlen].iov_len = iov[0].iov_len;
iov[iovlen].iov_base = iov[0].iov_base;
@@ -137,7 +141,7 @@
iovlen++;
}
- if(sz < total)
+ if (sz < total)
{
iov[iovlen].iov_len = total - sz;
iov[iovlen].iov_base = iov[0].iov_base;
Home |
Main Index |
Thread Index |
Old Index