diff --git a/demo/gtk-libfprint-test.c b/demo/gtk-libfprint-test.c index 68500639..30e91ef2 100644 --- a/demo/gtk-libfprint-test.c +++ b/demo/gtk-libfprint-test.c @@ -102,9 +102,9 @@ plot_minutiae (unsigned char *rgbdata, int i; #define write_pixel(num) do { \ - rgbdata[((num) * 3)] = 0xff; \ - rgbdata[((num) * 3) + 1] = 0; \ - rgbdata[((num) * 3) + 2] = 0; \ + rgbdata[((num) * 3)] = 0xff; \ + rgbdata[((num) * 3) + 1] = 0; \ + rgbdata[((num) * 3) + 2] = 0; \ } while(0) for (i = 0; i < minutiae->len; i++) diff --git a/libfprint/drivers/upeksonly.c b/libfprint/drivers/upeksonly.c index 9d93cc76..e7ea3ce2 100644 --- a/libfprint/drivers/upeksonly.c +++ b/libfprint/drivers/upeksonly.c @@ -74,26 +74,26 @@ struct _FpiDeviceUpeksonly FpiSsm *loopsm; /* Do we really need multiple concurrent transfers? */ - GCancellable *img_cancellable; - GPtrArray *img_transfers; - int num_flying; + GCancellable *img_cancellable; + GPtrArray *img_transfers; + int num_flying; - GSList *rows; - unsigned num_rows; - unsigned char *rowbuf; - int rowbuf_offset; + GSList *rows; + unsigned num_rows; + unsigned char *rowbuf; + int rowbuf_offset; - int wraparounds; - int num_blank; - int num_nonblank; - enum sonly_fs finger_state; - int last_seqnum; + int wraparounds; + int num_blank; + int num_nonblank; + enum sonly_fs finger_state; + int last_seqnum; enum sonly_kill_transfers_action killing_transfers; - GError *kill_error; - FpiSsm *kill_ssm; + GError *kill_error; + FpiSsm *kill_ssm; - struct fpi_line_asmbl_ctx assembling_ctx; + struct fpi_line_asmbl_ctx assembling_ctx; }; G_DECLARE_FINAL_TYPE (FpiDeviceUpeksonly, fpi_device_upeksonly, FPI, DEVICE_UPEKSONLY, FpImageDevice); diff --git a/libfprint/drivers/vfs101.c b/libfprint/drivers/vfs101.c index 7020726a..6963c59e 100644 --- a/libfprint/drivers/vfs101.c +++ b/libfprint/drivers/vfs101.c @@ -162,9 +162,9 @@ enum { /* Dump buffer for debug */ #define dump_buffer(buf) \ - fp_dbg ("%02x %02x %02x %02x %02x %02x %02x %02x", \ - buf[6], buf[7], buf[8], buf[9], buf[10], buf[11], buf[12], buf[13] \ - ) + fp_dbg ("%02x %02x %02x %02x %02x %02x %02x %02x", \ + buf[6], buf[7], buf[8], buf[9], buf[10], buf[11], buf[12], buf[13] \ + ) /* Callback of asynchronous send */ static void diff --git a/libfprint/drivers/vfs301_proto.c b/libfprint/drivers/vfs301_proto.c index 122a889a..6bbb3c7d 100644 --- a/libfprint/drivers/vfs301_proto.c +++ b/libfprint/drivers/vfs301_proto.c @@ -157,7 +157,7 @@ vfs301_proto_generate_0B (int subtype, gssize *len) } #define HEX_TO_INT(c) \ - (((c) >= '0' && (c) <= '9') ? ((c) - '0') : ((c) - 'A' + 10)) + (((c) >= '0' && (c) <= '9') ? ((c) - '0') : ((c) - 'A' + 10)) static guint8 * translate_str (const char **srcL, gssize *len) @@ -422,15 +422,15 @@ img_process_data (int first_block, FpDeviceVfs301 *dev, const guint8 *buf, int l /************************** PROTOCOL STUFF ************************************/ #define USB_RECV(from, len) \ - usb_recv (dev, from, len, NULL, NULL) + usb_recv (dev, from, len, NULL, NULL) #define USB_SEND(type, subtype) \ - { \ - const guint8 *data; \ - gssize len; \ - data = vfs301_proto_generate (type, subtype, &len); \ - usb_send (dev, data, len, NULL); \ - } + { \ + const guint8 *data; \ + gssize len; \ + data = vfs301_proto_generate (type, subtype, &len); \ + usb_send (dev, data, len, NULL); \ + } #define RAW_DATA(x) g_memdup2 (x, sizeof (x)), sizeof (x) @@ -489,13 +489,13 @@ vfs301_proto_peek_event (FpDeviceVfs301 *dev) * we will run into timeouts randomly and need to then try again. */ #define PARALLEL_RECEIVE(e1, l1, e2, l2) \ - { \ - g_autoptr(GError) error = NULL; \ - usb_recv (dev, e1, l1, NULL, &error); \ - usb_recv (dev, e2, l2, NULL, NULL); \ - if (g_error_matches (error, G_USB_DEVICE_ERROR, G_USB_DEVICE_ERROR_TIMED_OUT)) \ - usb_recv (dev, e1, l1, NULL, NULL); \ - } + { \ + g_autoptr(GError) error = NULL; \ + usb_recv (dev, e1, l1, NULL, &error); \ + usb_recv (dev, e2, l2, NULL, NULL); \ + if (g_error_matches (error, G_USB_DEVICE_ERROR, G_USB_DEVICE_ERROR_TIMED_OUT)) \ + usb_recv (dev, e1, l1, NULL, NULL); \ + } static void vfs301_proto_process_event_cb (FpiUsbTransfer *transfer, diff --git a/libfprint/drivers/vfs5011.c b/libfprint/drivers/vfs5011.c index b9e0587b..65c98c96 100644 --- a/libfprint/drivers/vfs5011.c +++ b/libfprint/drivers/vfs5011.c @@ -41,30 +41,30 @@ struct usb_action }; #define SEND(ENDPOINT, COMMAND) \ - { \ - .type = ACTION_SEND, \ - .endpoint = ENDPOINT, \ - .name = #COMMAND, \ - .size = sizeof (COMMAND), \ - .data = COMMAND \ - }, + { \ + .type = ACTION_SEND, \ + .endpoint = ENDPOINT, \ + .name = #COMMAND, \ + .size = sizeof (COMMAND), \ + .data = COMMAND \ + }, #define RECV(ENDPOINT, SIZE) \ - { \ - .type = ACTION_RECEIVE, \ - .endpoint = ENDPOINT, \ - .size = SIZE, \ - .data = NULL \ - }, + { \ + .type = ACTION_RECEIVE, \ + .endpoint = ENDPOINT, \ + .size = SIZE, \ + .data = NULL \ + }, #define RECV_CHECK(ENDPOINT, SIZE, EXPECTED) \ - { \ - .type = ACTION_RECEIVE, \ - .endpoint = ENDPOINT, \ - .size = SIZE, \ - .data = EXPECTED, \ - .correct_reply_size = sizeof (EXPECTED) \ - }, + { \ + .type = ACTION_RECEIVE, \ + .endpoint = ENDPOINT, \ + .size = SIZE, \ + .data = EXPECTED, \ + .correct_reply_size = sizeof (EXPECTED) \ + }, struct usbexchange_data { diff --git a/libfprint/drivers/vfs7552.c b/libfprint/drivers/vfs7552.c index 53b4d3f3..852e35b5 100644 --- a/libfprint/drivers/vfs7552.c +++ b/libfprint/drivers/vfs7552.c @@ -51,39 +51,39 @@ struct usb_action }; #define SEND(ENDPOINT, COMMAND) \ - { \ - .type = ACTION_SEND, \ - .endpoint = ENDPOINT, \ - .name = #COMMAND, \ - .size = sizeof (COMMAND), \ - .data = COMMAND \ - }, + { \ + .type = ACTION_SEND, \ + .endpoint = ENDPOINT, \ + .name = #COMMAND, \ + .size = sizeof (COMMAND), \ + .data = COMMAND \ + }, #define RECV(ENDPOINT, SIZE) \ - { \ - .type = ACTION_RECEIVE, \ - .endpoint = ENDPOINT, \ - .size = SIZE, \ - .data = NULL \ - }, + { \ + .type = ACTION_RECEIVE, \ + .endpoint = ENDPOINT, \ + .size = SIZE, \ + .data = NULL \ + }, #define RECV_CHECK(ENDPOINT, SIZE, EXPECTED) \ - { \ - .type = ACTION_RECEIVE, \ - .endpoint = ENDPOINT, \ - .size = SIZE, \ - .data = EXPECTED, \ - .correct_reply_size = sizeof (EXPECTED) \ - }, + { \ + .type = ACTION_RECEIVE, \ + .endpoint = ENDPOINT, \ + .size = SIZE, \ + .data = EXPECTED, \ + .correct_reply_size = sizeof (EXPECTED) \ + }, #define RECV_CHECK_SIZE(ENDPOINT, SIZE, EXPECTED) \ - { \ - .type = ACTION_RECEIVE, \ - .endpoint = ENDPOINT, \ - .size = SIZE, \ - .data = NULL, \ - .correct_reply_size = sizeof (EXPECTED) \ - }, + { \ + .type = ACTION_RECEIVE, \ + .endpoint = ENDPOINT, \ + .size = SIZE, \ + .data = NULL, \ + .correct_reply_size = sizeof (EXPECTED) \ + }, struct usbexchange_data { diff --git a/libfprint/fp-print.h b/libfprint/fp-print.h index ac6820d7..7a2abee3 100644 --- a/libfprint/fp-print.h +++ b/libfprint/fp-print.h @@ -29,7 +29,7 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (FpPrint, fp_print, FP, PRINT, GInitiallyUnowned) #define FP_FINGER_IS_VALID(finger) \ - ((finger) >= FP_FINGER_FIRST && (finger) <= FP_FINGER_LAST) + ((finger) >= FP_FINGER_FIRST && (finger) <= FP_FINGER_LAST) #include "fp-device.h" diff --git a/libfprint/fpi-compat.h b/libfprint/fpi-compat.h index 6582fb5a..ad86874a 100644 --- a/libfprint/fpi-compat.h +++ b/libfprint/fpi-compat.h @@ -43,7 +43,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDate, g_date_free); #define g_memdup2(data, size) g_memdup ((data), (size)) #else #define g_memdup2(data, size) \ - (G_GNUC_EXTENSION ({ \ + (G_GNUC_EXTENSION ({ \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ g_memdup2 ((data), (size)); \ G_GNUC_END_IGNORE_DEPRECATIONS \ diff --git a/libfprint/fpi-log.h b/libfprint/fpi-log.h index da612049..3231cf5f 100644 --- a/libfprint/fpi-log.h +++ b/libfprint/fpi-log.h @@ -80,12 +80,12 @@ * Uses fp_err() to print an error if the @condition is true. */ #define BUG_ON(condition) G_STMT_START \ - if (condition) { \ - char *s; \ - s = g_strconcat ("BUG: (", #condition, ")", NULL); \ - fp_err ("%s: %s() %s:%d", s, G_STRFUNC, __FILE__, __LINE__); \ - g_free (s); \ - } G_STMT_END + if (condition) { \ + char *s; \ + s = g_strconcat ("BUG: (", #condition, ")", NULL); \ + fp_err ("%s: %s() %s:%d", s, G_STRFUNC, __FILE__, __LINE__); \ + g_free (s); \ + } G_STMT_END /** * BUG: diff --git a/libfprint/fpi-ssm.h b/libfprint/fpi-ssm.h index d2601c88..ab80a26f 100644 --- a/libfprint/fpi-ssm.h +++ b/libfprint/fpi-ssm.h @@ -60,7 +60,7 @@ typedef void (*FpiSsmHandlerCallback)(FpiSsm *ssm, /* for library and drivers */ #define fpi_ssm_new(dev, handler, nr_states) \ - fpi_ssm_new_full (dev, handler, nr_states, nr_states, #nr_states) + fpi_ssm_new_full (dev, handler, nr_states, nr_states, #nr_states) FpiSsm *fpi_ssm_new_full (FpDevice *dev, FpiSsmHandlerCallback handler, int nr_states,