You could have written `long percent = strtol(...)`, and you should probably also check for negative values of `percent` and error out as well (or is this impossible due to the dash having another meaning in the command line?).