Handle errors of strtol properly

i.e. check errno and compare the tail pointer to the value pointer. If
they are the same no digits were found
1 file changed