Attention is currently required from: Stefan Reinauer, Angel Pons.
2 comments:
File sysfsgpio.c:
snprintf(s, sizeof(s), "/sys/class/gpio/gpio%s/direction", desc->pin);
desc->fd_direction = open(s, O_WRONLY);
if (desc->fd_direction < 0) {
msg_perr("Error: failed to open %s\n", s);
return -1;
}
snprintf(s, sizeof(s), "/sys/class/gpio/gpio%s/value", desc->pin);
desc->fd_value = open(s, O_RDONLY);
if (desc->fd_value < 0) {
msg_perr("Error: failed to open %s\n", s);
return -1;
}
I want to know why not use snprintf. The changes you hope will make the code messier.
Done
Patch Set #4, Line 204: static int parse_pins(struct sysfsgpio_pins *pins)
> if (v < 0 || v > 9999999) […]
Done
To view, visit change 49254. To unsubscribe, or for help writing mail filters, visit settings.