1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-22 19:52:49 +02:00

tools/atrf-gpio/atusb.c (gpio): _exit after USB error, to avoid futile cleanup

This commit is contained in:
Werner Almesberger 2011-06-05 21:37:46 -03:00
parent a73a8a2044
commit e9debdd4ab

View File

@ -66,11 +66,11 @@ static uint8_t gpio(struct atrf_dsc *dsc,
if (res < 0) {
dump_port(port-1, *data, *dir, mask);
fprintf(stderr, "ATUSB_GPIO: %s\n", usb_strerror());
exit(1);
_exit(1);
}
if (res != 3) {
fprintf(stderr, "ATUSB_GPIO: expected 3 bytes, got %d\n", res);
exit(1);
_exit(1);
}
*data = buf[1];
*dir = buf[2];