R
Richard Heathfield
Serve Laurijssen said:
The second point is trivially true (but it's still a point worth making).
The first point is more a matter of opinion but, as a matter of fact, I
agree with you.
"Richard Heathfield" <[email protected]> schreef in bericht
char s[(CHAR_BIT * sizeof n + 2) / 3 + 1];
I would do two things different. First its not immediately obvious where
the buffer size calculation comes from so I'd put that in a macro.
Second, if n becomes signed in the future you need one more space if n
becomes negative. The code gets a little easier to maintain then
The second point is trivially true (but it's still a point worth making).
The first point is more a matter of opinion but, as a matter of fact, I
agree with you.