9 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?
Done
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)
Done
Please, no space here
Done
Patch Set #8, Line 671: "on this flash chip.\n");
Please never break strings. It kills grep-ability. https://flashrom. […]
Done
r("Error: write protect is not supported "
"on this flash chip.\n");
also fixed.
msg_gerr("Error: write protect is not supported "
"on this flash chip.\n");
also fixed.
msg_gerr("Error: write protect is not supported "
"on this flash chip.\n");
ret = 1;
also fixed.
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.
Done and simplified the logic as well, thanks.
Patch Set #8, Line 188: msg_cerr("error setting modifier "
Another string that should not be broken.
Done
To view, visit change 40325. To unsubscribe, or for help writing mail filters, visit settings.