• Paul Eggert's avatar
    fstrcmp: don't assume strlen < INT_MAX · 1c6a3cf4
    Paul Eggert authored
    * lib/fstrcmp.c: Include stddef.h and stdint.h.
    (uintptr_t): Remove, as we're now assuming stdint.
    (OFFSET, EXTRA_CONTEXT_FIELDS, fstrcmp_bounded):
    Prefer ptrdiff_t to int when the value could exceed INT_MAX
    if the input string is long.
    (fstrcmp_bounded): Check for size-calculation overflow.  Prefer
    uintptr_t to size_t when the underlying value is a pointer casted
    to an unsigned integer.  Avoid unnecessary 'buffer != NULL' test.
    * modules/fstrcmp (Depends-on): Add stdint.