[tarantool-patches] [PATCH 1/1] salad: fix mhash 'random' method
Konstantin Osipov
kostja at tarantool.org
Fri Mar 1 01:04:12 MSK 2019
* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/03/01 00:29]:
> - return h->n_buckets;
> + mh_int_t res = mh_next(h, rnd % mh_end(h));
> + if (res != mh_end(h))
> + return res;
> + return mh_first(h);
Well, it takes some time to understand this code.
OK to push.
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
More information about the Tarantool-patches
mailing list