]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make sure 'start' is always initialized.
authorMichiel van Baak <michiel@vanbaak.info>
Fri, 4 Sep 2009 13:16:29 +0000 (13:16 +0000)
committerMichiel van Baak <michiel@vanbaak.info>
Fri, 4 Sep 2009 13:16:29 +0000 (13:16 +0000)
This is the same as rev 216222 in trunk but 1.4 is affected as well

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@216369 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/astobj2.c

index 991fd80fea486e349e9c0aa0bd349aae50cb2a96..89839aadcc1e84719949d0088ced9686f87964ca 100644 (file)
@@ -485,7 +485,7 @@ void *ao2_callback(struct ao2_container *c,
        if ((flags & OBJ_POINTER))      /* we know hash can handle this case */
                start = i = c->hash_fn(arg, flags & OBJ_POINTER) % c->n_buckets;
        else                    /* don't know, let's scan all buckets */
-               i = -1;         /* XXX this must be fixed later. */
+               start = i = -1;         /* XXX this must be fixed later. */
 
        /* determine the search boundaries: i..last-1 */
        if (i < 0) {