On Thu, Mar 17, 2022 at 08:25:09PM +0100, Roberto E. Vargas Caballero wrote: > On Tue, Mar 15, 2022 at 04:30:52PM +0600, NRK wrote: > > +static const char base64_digits[(unsigned char)-1] = { > > Any reason to write "(unsigned char)-1" instead of writing 256?
Didn't hardcode 255 for pedantic reasons (since char is guranteed to be at least, but not exactly 8bits), and didn't use UCHAR_MAX to avoid needlessly including <limits.h>. But given POSIX mandates 8bit chars, hardcoding 255 shouldn't be a problem in practice. - NRK