/* Because the pattern is used as an argument to memset it must evaluate to an unsigned integer that fits into a single byte.  */
static int parse_pattern(const char *arg)
/* Because the pattern is used as an argument to memset it must evaluate to an unsigned integer that fits into a single byte.  */
static int parse_pattern(const char *arg)
{
    char *endptr = NULL;
    long pattern;
    pattern = strtol(arg, &endptr, 0);
    if (pattern < 0 || pattern > UCHAR_MAX || *endptr != '\0') {
        printf("%s is not a valid pattern byte\n", arg);
        return -1;
    }
    return pattern;
}