[svn] commit: r2537 - /branches/trac256/src/lib/dns/util/binary_from_base32hex.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jul 20 00:28:10 UTC 2010
Author: jinmei
Date: Tue Jul 20 00:28:10 2010
New Revision: 2537
Log:
addressed review comments: use the size of table for range check instead of a fixed magic number; style consistency in assertion.
Modified:
branches/trac256/src/lib/dns/util/binary_from_base32hex.h
Modified: branches/trac256/src/lib/dns/util/binary_from_base32hex.h
==============================================================================
--- branches/trac256/src/lib/dns/util/binary_from_base32hex.h (original)
+++ branches/trac256/src/lib/dns/util/binary_from_base32hex.h Tue Jul 20 00:28:10 2010
@@ -53,10 +53,10 @@
};
// metrowerks trips this assertion - how come?
#if ! defined(__MWERKS__)
- BOOST_STATIC_ASSERT(128 == sizeof(lookup_table));
+ BOOST_STATIC_ASSERT(0x80 == sizeof(lookup_table));
#endif
signed char value = -1;
- if((unsigned)t <= 127)
+ if((unsigned)t < sizeof(lookup_table))
value = lookup_table[(unsigned)t];
if(-1 == value) {
isc_throw(isc::BadValue,
More information about the bind10-changes
mailing list