projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40baebf
)
fix off-by-one error in key detection logic for uninitialized warnings
author
Yves Orton
<demerphq@gmail.com>
Sat, 20 Oct 2012 12:54:09 +0000
(14:54 +0200)
committer
Yves Orton
<demerphq@gmail.com>
Sat, 20 Oct 2012 12:54:09 +0000
(14:54 +0200)
Prior to this patch we would not look at the 0th bucket.
sv.c
patch
|
blob
|
history
t/lib/warnings/9uninit
patch
|
blob
|
history
diff --git
a/sv.c
b/sv.c
index
f728516
..
9f9ef1c
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-13836,7
+13836,7
@@
S_find_hash_subscript(pTHX_ const HV *const hv, const SV *const val)
array = HvARRAY(hv);
- for (i=HvMAX(hv); i>0; i--) {
+ for (i=HvMAX(hv); i>
=
0; i--) {
HE *entry;
for (entry = array[i]; entry; entry = HeNEXT(entry)) {
if (HeVAL(entry) != val)
diff --git
a/t/lib/warnings/9uninit
b/t/lib/warnings/9uninit
index
db5c634
..
781d1fa
100644
(file)
--- a/
t/lib/warnings/9uninit
+++ b/
t/lib/warnings/9uninit
@@
-2043,7
+2043,6
@@
write;
EXPECT
Use of uninitialized value $x in string at - line 6.
########
-# TODO bugfix will come next patch
# NAME off-by-one error in hash bucket walk in key detection logic
use warnings 'uninitialized';