| 59 | static const char* binary_name = NULL; |
| 60 | |
| 61 | static void perr(char const *format, ...) |
| 62 | { |
| 63 | va_list args; |
| 64 | |
| 65 | va_start (args, format); |
| 66 | vfprintf(stderr, format, args); |
| 67 | va_end(args); |
| 68 | } |
| 69 | |
| 70 | #define ERR_EXIT(errcode) do { perr(" %s\n", libusb_strerror((enum libusb_error)errcode)); return -1; } while (0) |
| 71 | #define CALL_CHECK(fcall) do { int _r=fcall; if (_r < 0) ERR_EXIT(_r); } while (0) |
no outgoing calls