Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/tests/lib/libc/sys



On 01.07.2019 14:59, Robert Elz wrote:
>     Date:        Mon, 1 Jul 2019 11:55:57 +0200
>     From:        Joerg Sonnenberger <joerg%bec.de@localhost>
>     Message-ID:  <20190701095557.GA55681%bec.de@localhost>
> 
>   | On Mon, Jul 01, 2019 at 02:04:38AM +0000, Kamil Rytarowski wrote:
> 
>   | > Cast note_hdr.n_namesz to ssize_t through size_t to avoid potential
>   | > signedness bit shifts.
>   |
>   | This change makes no sense.
> 
> Certainly the size_t cast is pointless ... and I have no idea what
> the comment in the commit message about bit shifts is about, this is
> (was) a simple comparison of an unsigned with a signed, which the
> cast to ssize_t turns into a signed comparison, which is as it should be.
> There are no bit shifts.
> 
> kre
> 
> 

OK, it was cast of 32bit value to ssize_t that can be 64bit.

The original type is uint32_t, not int32_t, so intermediate cast is not
needed.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index