extra/usb_console/usb_console.c: Format with clang-format
BRANCH=none
TEST=none
@@ -41,8 +41,7 @@ static void request_exit(const char *format, ...)
}
#define BOO(msg, r) \
- request_exit("%s: line %d, %s\n", msg, __LINE__, \
- libusb_error_name(r))
+ request_exit("%s: line %d, %s\n", msg, __LINE__, libusb_error_name(r))
static void sighandler(int signum)
{
@@ -105,8 +104,8 @@ static void send_tx(int len)
{
int r;
- libusb_fill_bulk_transfer(tx_transfer, devh,
- ep_num, tx_buf, len, cb_tx, NULL, 0);
+ libusb_fill_bulk_transfer(tx_transfer, devh, ep_num, tx_buf, len, cb_tx,
+ NULL, 0);
r = libusb_submit_transfer(tx_transfer);
if (r < 0)
@@ -235,10 +234,8 @@ static char *progname;
static char *short_opts = ":v:p:e:h";
static const struct option long_opts[] = {
/* name hasarg *flag val */
- {"vid", 1, NULL, 'v'},
- {"pid", 1, NULL, 'p'},
- {"ep", 1, NULL, 'e'},
- {"help", 0, NULL, 'h'},
+ { "vid", 1, NULL, 'v' }, { "pid", 1, NULL, 'p' },
+ { "ep", 1, NULL, 'e' }, { "help", 0, NULL, 'h' },
{ NULL, 0, NULL, 0 },
};
@@ -254,7 +251,8 @@ static void usage(int errs)
" -p,--pid HEXVAL Product ID (default %04x)\n"
" -e,--ep NUM Endpoint (default %d)\n"
" -h,--help Show this message\n"
- "\n", progname, vid, pid, ep_num);
+ "\n",
+ progname, vid, pid, ep_num);
exit(!!errs);
}
@@ -368,9 +366,8 @@ int main(int argc, char *argv[])
printf("can't alloc rx_transfer");
goto out;
}
- libusb_fill_bulk_transfer(rx_transfer, devh,
- 0x80 | ep_num,
- rx_buf, sizeof(rx_buf), cb_rx, NULL, 0);
+ libusb_fill_bulk_transfer(rx_transfer, devh, 0x80 | ep_num, rx_buf,
+ sizeof(rx_buf), cb_rx, NULL, 0);
tx_transfer = libusb_alloc_transfer(0);
if (!tx_transfer) {
