6 comments:
char *endptr = NULL, *token = NULL;
if (!optarg) {
msg_gerr("Error: No wp-range values provided\n");
return -1;
}
token = strtok(optarg, ",");
if (!token) {
msg_gerr("Error: Invalid wp-range argument format\n");
return -1;
}
*start = strtoul(token, &endptr, 0);
token = strtok(NULL, ",");
if (!token) {
msg_gerr("Error: Invalid wp-range argument format\n");
return -1;
}
*len = strtoul(token, &endptr, 0);
return 0;
One tab too many?
Patch Set #8, Line 153: set_wp_disable = 0, wp_status = 0, wp_list = 0;
Missing `int` (yes, I know it can work like this, but please be consistent)
Please, no space here
Patch Set #8, Line 671: "on this flash chip.\n");
Please never break strings. It kills grep-ability. https://flashrom.org/Development_Guidelines#Coding_style
Patch Set #8, Line 726: if (set_wp_range && set_wp_region) {
This can be handled much earlier, around where `set_wp_enable && set_wp_disable` is checked.
Patch Set #8, Line 188: msg_cerr("error setting modifier "
Another string that should not be broken.
To view, visit change 40325. To unsubscribe, or for help writing mail filters, visit settings.