bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] Basic support for checking NFSv4 ACLs in Linux


From: Paul Eggert
Subject: Re: [PATCH] Basic support for checking NFSv4 ACLs in Linux
Date: Wed, 28 Dec 2022 09:09:40 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 12/28/22 01:07, Ondrej Valousek wrote:
I was actually wondering why did not you reuse the suggestion from Andreas:
#  define ROUNDUP(x, y)                  (((x) + (y) - 1) & - (y))

It didn't work when the + overflowed, and it assumed two's complement. The latter assumption is pretty safe nowadays (and will be required by C23, finally!) but I have a thing about portability. Although these issues are fixable the particular situation here (where values close to 2**32-1 really do represent 2**32 bytes, and where gcc incorrectly complains about adding aligned byte counts to aligned pointers) suggested special code.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]