diff options
author | mvp <mvp@users.noreply.github.com> | 2018-04-30 11:49:50 -0700 |
---|---|---|
committer | mvp <mvp@users.noreply.github.com> | 2018-04-30 11:49:50 -0700 |
commit | 003ba1ff66a750e32aa90149d440a61237499bfe (patch) | |
tree | 5ba75f700b3ad4a8fe4dee67cecd0a06e3da163c /uhubctl.c | |
parent | 2311a1c76f278a2cd13afa563f447bbf8bbf54fb (diff) |
Code formatting cleanups
Diffstat (limited to 'uhubctl.c')
-rw-r--r-- | uhubctl.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -224,7 +224,7 @@ static const struct option long_options[] = { }; -int print_usage() +static int print_usage() { printf( "uhubctl %s: utility to control USB port power for smart hubs.\n" @@ -261,7 +261,7 @@ static char* rtrim(char* str) { int i; for (i = strlen(str)-1; i>=0 && isspace(str[i]); i--) { - str[i] = 0; + str[i] = 0; } return str; } @@ -273,14 +273,13 @@ static char* rtrim(char* str) * returns 0 for success and error code for failure. */ -int get_hub_info(struct libusb_device *dev, struct hub_info *info) +static int get_hub_info(struct libusb_device *dev, struct hub_info *info) { int rc = 0; int len = 0; struct libusb_device_handle *devh = NULL; unsigned char buf[LIBUSB_DT_HUB_NONVAR_SIZE + 2 + 3] = {0}; - struct usb_hub_descriptor *uhd = - (struct usb_hub_descriptor *)buf; + struct usb_hub_descriptor *uhd = (struct usb_hub_descriptor *)buf; int minlen = LIBUSB_DT_HUB_NONVAR_SIZE + 2; struct libusb_device_descriptor desc; rc = libusb_get_device_descriptor(dev, &desc); |