Re: [hackers] [st][PATCH] rm unnecessary explicit zeroing

From: Laslo Hunhold <dev_AT_frign.de>
Date: Thu, 17 Mar 2022 20:36:15 +0100

On Thu, 17 Mar 2022 20:25:09 +0100
"Roberto E. Vargas Caballero" <k0ga_AT_shike2.com> wrote:

Dear Roberto,

> 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?

char is not guaranteed to be 8-Bit (unless we assume Posix, which is
reasonable within Posix), and you probably meant 255. An alternative
would be to go with UCHAR_MAX from limits.h.

With best regards

Laslo
Received on Thu Mar 17 2022 - 20:36:15 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 17 2022 - 20:36:42 CET