summaryrefslogtreecommitdiff
path: root/device
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2013-12-02 23:30:03 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-05 05:44:31 +0900
commit4af39064e3e4a6e08f4d702092b1e4bfe3289be9 (patch)
tree1302c135b5f886f3d65615549adf6fd17a7aac13 /device
parentf34397dadc2d60c32aa1e42ab96950b61ea22f54 (diff)
device/net_io.c: initialize hash_entp to NULL
* device/net_io.c (hash_entp): Initialize to NET_HASH_ENTRY_NULL.
Diffstat (limited to 'device')
-rw-r--r--device/net_io.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/device/net_io.c b/device/net_io.c
index 1958840..ee475ef 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -1158,7 +1158,7 @@ net_set_filter(ifp, rcv_port, priority, filter, filter_count)
net_rcv_port_t infp, my_infp;
net_rcv_port_t nextfp;
net_hash_header_t hhp;
- net_hash_entry_t entp, hash_entp;
+ net_hash_entry_t entp;
net_hash_entry_t *head, nextentp;
queue_entry_t dead_infp, dead_entp;
int i;
@@ -1166,6 +1166,13 @@ net_set_filter(ifp, rcv_port, priority, filter, filter_count)
io_return_t rval;
boolean_t in, out;
+ /* Initialize hash_entp to NULL to quiet GCC
+ * warning about uninitialized variable. hash_entp is only
+ * used when match != 0; in that case it is properly initialized
+ * by kmem_cache_alloc().
+ */
+ net_hash_entry_t hash_entp = NULL;
+
/*
* Check the filter syntax.
*/