Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Add RCSID and fix -Wsign-compare warnings.
details: https://anonhg.NetBSD.org/src/rev/a6f31336ad06
branches: trunk
changeset: 782642:a6f31336ad06
user: alnsn <alnsn%NetBSD.org@localhost>
date: Sat Nov 10 22:12:31 2012 +0000
description:
Add RCSID and fix -Wsign-compare warnings.
diffstat:
sys/net/bpfjit.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 651c6cdda252 -r a6f31336ad06 sys/net/bpfjit.c
--- a/sys/net/bpfjit.c Sat Nov 10 18:42:22 2012 +0000
+++ b/sys/net/bpfjit.c Sat Nov 10 22:12:31 2012 +0000
@@ -27,6 +27,13 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+#ifdef _KERNEL
+__KERNEL_RCSID(0, "$NetBSD: bpfjit.c,v 1.2 2012/11/10 22:12:31 alnsn Exp $");
+#else
+__RCSID("$NetBSD: bpfjit.c,v 1.2 2012/11/10 22:12:31 alnsn Exp $");
+#endif
+
#include <net/bpfjit.h>
#ifndef _KERNEL
@@ -187,10 +194,10 @@
/*
* Get offset of M[k] on the stack.
*/
-static int
-mem_local_offset(uint32_t k, int minm)
+static size_t
+mem_local_offset(uint32_t k, unsigned int minm)
{
- int moff = (k - minm) * sizeof(uint32_t);
+ size_t moff = (k - minm) * sizeof(uint32_t);
#ifdef _KERNEL
/*
@@ -1093,7 +1100,7 @@
{
unsigned int rv = BPFJIT_INIT_A;
struct bpf_insn *pc;
- int minm, maxm;
+ unsigned int minm, maxm;
BPFJIT_ASSERT(BPF_MEMWORDS - 1 <= 0xff);
@@ -1203,9 +1210,9 @@
int branching, negate;
unsigned int rval, mode, src;
int ntmp;
- int locals_size;
- int minm, maxm; /* min/max k for M[k] */
- int mem_locals_start; /* start of M[] array */
+ unsigned int locals_size;
+ unsigned int minm, maxm; /* min/max k for M[k] */
+ size_t mem_locals_start; /* start of M[] array */
unsigned int opts;
struct bpf_insn *pc;
struct sljit_compiler* compiler;
Home |
Main Index |
Thread Index |
Old Index