From 7663a4aac625268674060d78ee00f97a36a03af7 Mon Sep 17 00:00:00 2001 From: Hartmut Knaack Date: Wed, 10 Jun 2015 21:51:20 +0200 Subject: tools:iio: adjust coding style Fix various coding style issues, including: * have spaces around operators * indentation * consolidate parameters in same line * required braces * adjust/drop comments * multiline comment style * delete unnecessary empty lines * add empty lines to visualize logial code blocks * typos Signed-off-by: Hartmut Knaack Signed-off-by: Jonathan Cameron --- tools/iio/iio_event_monitor.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tools/iio/iio_event_monitor.c') diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index 016760e769c0..a4ab6bb8f872 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -13,7 +13,6 @@ * * Usage: * iio_event_monitor - * */ #include @@ -209,7 +208,8 @@ static void print_event(struct iio_event_data *event) if (!event_is_known(event)) { printf("Unknown event: time: %lld, id: %llx\n", - event->timestamp, event->id); + event->timestamp, event->id); + return; } @@ -229,6 +229,7 @@ static void print_event(struct iio_event_data *event) if (dir != IIO_EV_DIR_NONE) printf(", direction: %s", iio_ev_dir_text[dir]); + printf("\n"); } @@ -251,14 +252,16 @@ int main(int argc, char **argv) dev_num = find_type_by_name(device_name, "iio:device"); if (dev_num >= 0) { printf("Found IIO device with name %s with device number %d\n", - device_name, dev_num); + device_name, dev_num); ret = asprintf(&chrdev_name, "/dev/iio:device%d", dev_num); if (ret < 0) { return -ENOMEM; } } else { - /* If we can't find a IIO device by name assume device_name is a - IIO chrdev */ + /* + * If we can't find an IIO device by name assume device_name is + * an IIO chrdev + */ chrdev_name = strdup(device_name); if (!chrdev_name) return -ENOMEM; -- cgit v1.2.3-59-g8ed1b