[libgee] Initialize 'next' variables
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [libgee] Initialize 'next' variables
- Date: Thu, 16 Jul 2009 09:00:26 +0000 (UTC)
commit 1c9e4d15931d11be11ec9cc59417e36971d0102b
Author: Didier 'Ptitjes <ptitjes free fr>
Date: Thu Jul 16 10:53:46 2009 +0200
Initialize 'next' variables
Fixes bug 588758.
Signed-off-by: Didier 'Ptitjes <ptitjes free fr>
gee/hashmap.vala | 2 +-
gee/hashset.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gee/hashmap.vala b/gee/hashmap.vala
index 9fa09d3..c69eac6 100644
--- a/gee/hashmap.vala
+++ b/gee/hashmap.vala
@@ -156,7 +156,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
for (int i = 0; i < _array_size; i++) {
Node<K,V> node;
- Node<K,V> next;
+ Node<K,V> next = null;
for (node = (owned) _nodes[i]; node != null; node = (owned) next) {
next = (owned) node.next;
uint hash_val = node.key_hash % new_array_size;
diff --git a/gee/hashset.vala b/gee/hashset.vala
index d0d0226..ca1dae6 100644
--- a/gee/hashset.vala
+++ b/gee/hashset.vala
@@ -140,7 +140,7 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
for (int i = 0; i < _array_size; i++) {
Node<G> node;
- Node<G> next;
+ Node<G> next = null;
for (node = (owned) _nodes[i]; node != null; node = (owned) next) {
next = (owned) node.next;
uint hash_val = node.key_hash % new_array_size;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]