diff options
author | Adam Moss <moss@lindenlab.com> | 2009-02-03 17:56:26 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2009-02-03 17:56:26 +0000 |
commit | e188badaf29a1a02307f93864eed6737096bd9a1 (patch) | |
tree | 767259ad3385fd9ede9722e04752bea008469f8c /indra/llcommon/llbase32.cpp | |
parent | 4ad54702fce32905402cb6055c085ac14de188a2 (diff) |
QAR-1177 maint-viewer-12 + uploadfees-viewer combo mergeme
svn merge -r108355:109316
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/maint-viewer-12-uploadfees-qa108314
Whew.
Diffstat (limited to 'indra/llcommon/llbase32.cpp')
-rw-r--r-- | indra/llcommon/llbase32.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/llcommon/llbase32.cpp b/indra/llcommon/llbase32.cpp index c8b6ffff38..5e6ced9ce1 100644 --- a/indra/llcommon/llbase32.cpp +++ b/indra/llcommon/llbase32.cpp @@ -146,8 +146,6 @@ base32_encode(char *dst, size_t size, const void *data, size_t len) /* *TODO: Implement base32 encode. -#define ARRAY_LEN(a) (sizeof (a) / sizeof((a)[0])) - static inline int ascii_toupper(int c) { @@ -173,7 +171,7 @@ base32_decode(char *dst, size_t size, const void *data, size_t len) unsigned max_pad = 3; if (0 == base32_map[0]) { - for (i = 0; i < ARRAY_LEN(base32_map); i++) { + for (i = 0; i < LL_ARRAY_SIZE(base32_map); i++) { const char *x; x = memchr(base32_alphabet, ascii_toupper(i), sizeof base32_alphabet); @@ -197,7 +195,7 @@ base32_decode(char *dst, size_t size, const void *data, size_t len) } } - j = i % ARRAY_LEN(s); + j = i % LL_ARRAY_SIZE(s); s[j] = c; if (7 == j) { @@ -209,7 +207,7 @@ base32_decode(char *dst, size_t size, const void *data, size_t len) b[3] = ((s[4] & 1) << 7) | ((s[5] & 0x1f) << 2) | ((s[6] >> 3) & 0x03); b[4] = ((s[6] & 0x07) << 5) | (s[7] & 0x1f); - for (j = 0; j < ARRAY_LEN(b); j++) { + for (j = 0; j < LL_ARRAY_SIZE(b); j++) { if (q != end) *q = b[j]; q++; |