Use strtol without casting, to shut up gcc -Wcast-qual.
strtol should really have been two functions with types
long int strtol(char *nptr, char **endptr, int base);
long int strtol(const char *nptr, const char **endptr, int base);
but C doesn’t have overloading, so the real strtol has make a small
type safety compromise:
long int strtol(const char *nptr, char **endptr, int base);
Such a compromise would be invisible in the return type (as it is with
char *strchr(const char *s, int c)), because char * may be implicitly
casted back to const char *. But here char **endptr is an output
pointer argument, and we can’t pass it the address of a const char *.
Initially I rejected that compromise by casting endptr from the
address of a const char *. But that makes gcc -Wcast-qual emit an
unnecessary warning, so let’s just use a char * instead.
</rant>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>