[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] gnumach/device/net_io.c (bpf_hash): expect unsigned long pointer
From: |
Marin Ramesa |
Subject: |
[PATCH] gnumach/device/net_io.c (bpf_hash): expect unsigned long pointer type |
Date: |
Sat, 29 Jun 2013 16:23:30 +0200 |
Sometimes, bpf_hash gets arguments passed from incompatible pointer
types. This patch fixes this warning.
--- ./gnumach/device/net_io.c 2013-06-28 10:10:49.877024364 +0200
+++ ./gnumach1/device/net_io.c 2013-06-29 15:02:43.758232365 +0200
@@ -310,7 +310,7 @@
#define N_NET_HASH 4
#define N_NET_HASH_KEYS 4
-unsigned int bpf_hash (int, unsigned int *);
+unsigned long bpf_hash (int, unsigned long *);
/*
* A single hash entry.
@@ -321,7 +321,7 @@
#define he_prev chain.prev
ipc_port_t rcv_port; /* destination port */
int rcv_qlimit; /* qlimit for the port */
- unsigned int keys[N_NET_HASH_KEYS];
+ unsigned long keys[N_NET_HASH_KEYS];
};
typedef struct net_hash_entry *net_hash_entry_t;
@@ -2014,12 +2014,12 @@
return TRUE;
}
-unsigned int
+unsigned long
bpf_hash (n, keys)
register int n;
- register unsigned int *keys;
+ register unsigned long *keys;
{
- register unsigned int hval = 0;
+ register unsigned long hval = 0;
while (n--) {
hval += *keys++;
- [PATCH] gnumach/device/net_io.c (bpf_hash): expect unsigned long pointer type,
Marin Ramesa <=