lib: Re-implement moving of thread authors.
authorCarl Worth <cworth@cworth.org>
Tue, 27 Apr 2010 08:48:03 +0000 (01:48 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 27 Apr 2010 08:48:03 +0000 (01:48 -0700)
commitc210d5632e7346b9c8582a93685747f201a27267
tree8f719f411506f10798ca9d4821d1eae321037836
parent8514e59efcfc9b279e0305ea5daf922de79b6447
lib: Re-implement moving of thread authors.

Just before releasing 0.3 we received reports of crashes that were
bisected to the commit adding thread-author moving. Sure enough,
valgrind pointed to buffer overruns in _thread_move_matched_author.

Rather than trying to make sense of all the by strncpy, strchr, +1,
and +2 of that code, I reimplemented thread-author ordering with a
pair of hash tables and an array.

Valgrind is at least happy now on the test cases it was complaining
about previously.
lib/thread.cc