summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorKrzysztof A. Adamski <krzysztofa@gmail.com>2008-06-02 16:45:31 -0400
committerKrzysztof A. Adamski <krzysztofa@gmail.com>2008-06-02 16:45:31 -0400
commit738d94104b6f170f79eac14cbf9ffe910b99876d (patch)
tree81ae59392cec9c02d030cdb440740606ea3b8a78 /func
parent76e79e0b7573e470deadd007a431e401efe4903e (diff)
downloadthird_party-func-738d94104b6f170f79eac14cbf9ffe910b99876d.tar.gz
third_party-func-738d94104b6f170f79eac14cbf9ffe910b99876d.tar.xz
third_party-func-738d94104b6f170f79eac14cbf9ffe910b99876d.zip
Fix __bucketize to always start from key 0.
Diffstat (limited to 'func')
-rw-r--r--func/forkbomb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/func/forkbomb.py b/func/forkbomb.py
index b835d3d..4448337 100644
--- a/func/forkbomb.py
+++ b/func/forkbomb.py
@@ -75,8 +75,8 @@ def __bucketize(pool, slots):
buckets = {}
count = 0
for key in pool:
- count = count + 1
slot = count % slots
+ count = count + 1
if not buckets.has_key(slot):
buckets[slot] = []
buckets[slot].append(key)