I don't like the parsing of the command-line parameters at all.
Patch set 2:Code-Review -1
8 comments:
Patch Set #2, Line 379: /* Will be freed by shutdown function if necessary. */
Why is this gone?
if (!strcmp(tmp, "auto"))
size = SIZE_AUTO;
This branch of the if should have braces
Patch Set #2, Line 293: case 'k': case 'K':
I'd put these two case statements in separate lines:
case 'k':
case 'K':
Patch Set #2, Line 303: tmp[strlen(tmp) - 1] = '\0';
This should be on a separate line
Patch Set #2, Line 304: atoi(tmp)
What will happen if I specify the following sizes as a parameter?
K
1G
87654321
-512m
1
big_enough
0
that's 4 MiB (4 MB would be size=4000000)
if (emu_chip_size % 1024)
msg_perr("%s: emu_chip_size is not multipler of 1024.\n",
__func__);
Please move this to the parsing of the commmandline arguments
#define VARIABLE_SIZE_MANUF_ID 0x3eaf
#define VARIABLE_SIZE_DEVICE_ID 0x10af
Where do these IDs come from? Why not use PROGMANUF_ID and PROGDEV_ID instead?
To view, visit change 44879. To unsubscribe, or for help writing mail filters, visit settings.