lkml.org 
[lkml]   [2012]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] strings: helper for maximum decimal encoding of an unsigned integer
Jan Engelhardt wrote:

Your way does not function as originally desired.

* base10len(i) no longer expands to a compile-time constant

* you will definitely have a variable base10len_vals in your
objects, so you waste a read operation whenever it is used.

No, I meant my original way:
#define base10len(i) (sizeof(i) * 8 * 3 / 10 + 1)


\
 
 \ /
  Last update: 2012-09-14 17:41    [from the cache]
©2003-2011 Jasper Spaans