Attention is currently required from: Felix Singer, Nico Huber, Angel Pons.
4 comments:
File ft2232_spi.c:
Patch Set #16, Line 483: msg_perr
As the message says "warning", use msg_pwarn()?
Done
Patch Set #16, Line 484: "in the future. Use `gpiolX=C` instead.\n");
We try to keep output within 80 columns. Could add a \n after the […]
Done
Patch Set #16, Line 513: arg_gpiol[3] = extract_programmer_param("gpiol3");
This looks a little odd. How about moving the call into the loop?
We could still use an array for the string literals, e.g.const char *const gpiol_params[] = { "gpiol0", "gpiol1", ...
char *const arg = extract_programmer_param(gpiol_params[pin]);Alternatively, a single buffer could be used like this:
char gpiol_param[7];
snprintf(gpiol_param, sizeof(gpiol_param), "gpiol%d", pin);
char *const arg = extract_programmer_param(gpiol_param);
Yep, nice idea. I took the second one.
`char *const arg` doesn't work, since arg is declared globally already. I'm reusing that one instead.
> Also just noticed: In the current form, any premature `return` inside
> the loop would leak some of these arg_gpiol[] pointers.
Sure, any return would need `free(arg)` before. That also applies to the solutions above, doesn't it?
Patch Set #16, Line 538: bool format_error = 0;
Just to mention it, don't know how reasonable it would look: For error […]
Heh, I thought about using it but feared people (you :P) wouldn't like it :D Done
To view, visit change 57810. To unsubscribe, or for help writing mail filters, visit settings.