Re: [PATCH] strings: helper for maximum decimal encoding of anunsigned integer

From: Jim Rees
Date: Fri Sep 14 2012 - 09:54:48 EST

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)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at