dovecot-2.2: lib: bits - improve bits_required to recurse downwa...

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 18 15:11:17 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/30953774f034
changeset: 18367:30953774f034
user:      Phil Carmody <phil at dovecot.fi>
date:      Wed Mar 18 17:10:03 2015 +0200
description:
lib: bits - improve bits_required to recurse downwards, not sideways
Ooops.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

diffstat:

 src/lib/bits.h |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 305f5c2cf13e -r 30953774f034 src/lib/bits.h
--- a/src/lib/bits.h	Wed Mar 18 17:09:30 2015 +0200
+++ b/src/lib/bits.h	Wed Mar 18 17:10:03 2015 +0200
@@ -25,7 +25,7 @@
 unsigned int bits_required16(uint16_t num)
 {
 	return (num <= 0xff) ? bits_required8(num)
-		: 8 + bits_required16(num >> 8);
+		: 8 + bits_required8(num >> 8);
 }
 static inline
 unsigned int bits_required32(uint32_t num)


More information about the dovecot-cvs mailing list