[Toybox] [PATCH] devmem: Fix 8 byte wide writes
Rob Landley
rob at landley.net
Tue Sep 19 04:37:55 PDT 2023
On 9/18/23 18:08, Michael Shavit wrote:
> On Thu, Aug 31, 2023 at 3:57 AM Rob Landley <rob at landley.net> wrote:
>> +unsigned long long atollu(char *str)
>> +{
>> + char *end = str;
>> + unsigned long long llu = strtoul(str, &end, 0);
>
> Sorry I didn't notice this earlier, but hortune at google.com pointed out
> that we should be using strtoull() here. This supposedly isn't an
> issue on 64bit systems since toybox already assumes unsigned long and
> unsigned long long to both be exactly 64 bits, but could be
> problematic for a 32bit system where the two types have different
> sizes (although I haven't fully thought through the implications).
>
> On second look, shouldn't we also be checking errno?
How does 85ae0e1b5248 look?
Rob
More information about the Toybox
mailing list