On October 15, 2018 2:03:10 AM GMT+02:00, Al Viro
wrote:
>On Sun, Oct 14, 2018 at 08:53:46PM +0200, Christian Brauner wrote:
>
>> > Yecchh... First of all, the cast back to unsigned long long is
>completely
>> > pointless. What's more,
>>
>> Sorry, seriously asking: why? This was meant to hand
On Sun, Oct 14, 2018 at 08:53:46PM +0200, Christian Brauner wrote:
> > Yecchh... First of all, the cast back to unsigned long long is completely
> > pointless. What's more,
>
> Sorry, seriously asking: why? This was meant to handle the case where
> sizeof(unsigned long long) != sizeof(unsigned
On October 15, 2018 12:13:25 AM GMT+02:00, Alexey Dobriyan
wrote:
>> > Yecchh... First of all, the cast back to unsigned long long is
>completely
>> > pointless. What's more,
>>
>> Sorry, seriously asking: why?
>
>In C everything is casted to the same type before doing an operation,
Oh, ok th
> > Yecchh... First of all, the cast back to unsigned long long is completely
> > pointless. What's more,
>
> Sorry, seriously asking: why?
In C everything is casted to the same type before doing an operation,
in this case comparison
> This was meant to handle the case where
> sizeof(unsigned
On Sun, Oct 14, 2018 at 06:18:55PM +0100, Al Viro wrote:
> On Sun, Oct 14, 2018 at 03:25:09PM +0200, Christian Brauner wrote:
>
> > +static unsigned long sysctl_strtoul_lenient(const char *cp, char **endp,
> > + unsigned int base, bool *overflow)
> > +{
> > +
On Sun, Oct 14, 2018 at 03:25:09PM +0200, Christian Brauner wrote:
> +static unsigned long sysctl_strtoul_lenient(const char *cp, char **endp,
> + unsigned int base, bool *overflow)
> +{
> + unsigned long long result;
> + unsigned int rv;
> +
> +
proc_get_long() is a funny function. It uses simple_strtoul() and for a
good reason. proc_get_long() wants to always succeed the parse and
return the maybe incorrect value and the trailing characters to check
against a pre-defined list of acceptable trailing values.
However, simple_strtoul() doesn
7 matches
Mail list logo