aboutsummaryrefslogtreecommitdiff
path: root/elksmart-comm.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-12-26 12:26:19 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-12-26 12:26:19 +0100
commite53cddb030774765dec14ab120991fc775bc6959 (patch)
tree8f23edf3271f3bb6b3c651ddab6c97a05db2582f /elksmart-comm.c
parent8832ba22274540a406465ee96782393ab32faa5a (diff)
downloadusb-drivers-e53cddb030774765dec14ab120991fc775bc6959.tar.gz
usb-drivers-e53cddb030774765dec14ab120991fc775bc6959.tar.xz
usb-drivers-e53cddb030774765dec14ab120991fc775bc6959.zip
Fix up code style adjustments
Diffstat (limited to 'elksmart-comm.c')
-rw-r--r--elksmart-comm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/elksmart-comm.c b/elksmart-comm.c
index 4d5d830..3aeec34 100644
--- a/elksmart-comm.c
+++ b/elksmart-comm.c
@@ -196,7 +196,7 @@ compress_value(unsigned value, struct str *encoded)
}
static void
-compress_pulses (const struct pulse *pulses, size_t len, struct str *encoded)
+compress_pulses(const struct pulse *pulses, size_t len, struct str *encoded)
{
unsigned counts[len];
memset(counts, 0, sizeof counts);
@@ -527,15 +527,15 @@ send_identify(libusb_device_handle *device, struct error **e)
#if 0
// The EKX4S does not respond to this request.
static uint8_t c_serial[] = { -5, -5, -5, -5 };
- if ((result = libusb_bulk_transfer (device, g.endpoint_out,
+ if ((result = libusb_bulk_transfer(device, g.endpoint_out,
c_serial, sizeof c_serial, &len, 100)))
- return error_set (e, "serial/send: %s", libusb_strerror (result));
- if ((result = libusb_bulk_transfer (device, g.endpoint_in,
+ return error_set(e, "serial/send: %s", libusb_strerror(result));
+ if ((result = libusb_bulk_transfer(device, g.endpoint_in,
buffer, sizeof buffer, &len, 100)))
- return error_set (e, "serial/recv: %s", libusb_strerror (result));
+ return error_set(e, "serial/recv: %s", libusb_strerror(result));
if (len < (int) sizeof c_serial ||
- memcmp (buffer, c_serial, sizeof c_serial))
- return error_set (e, "serial retrieval failed");
+ memcmp(buffer, c_serial, sizeof c_serial))
+ return error_set(e, "serial retrieval failed");
#endif
return true;
}