From 2c5aa6e14e5a5221ccb9d4ac142a178368524afd Mon Sep 17 00:00:00 2001 From: sunghan Date: Mon, 14 Aug 2017 17:38:50 +0900 Subject: [PATCH] fix violations of coding rule at framework arastorage : [M04] Operators have following space rules. Put a space around(on each side of) most binary and ternary operators iotbus : [M08] Open braces for enum, union and struct go on the same line. --- framework/include/iotbus/iotbus_gpio.h | 3 +-- framework/include/iotbus/iotbus_i2c.h | 3 +-- framework/include/iotbus/iotbus_pwm.h | 3 +-- framework/include/iotbus/iotbus_spi.h | 3 +-- framework/include/iotbus/iotbus_uart.h | 3 +-- framework/src/arastorage/relation.h | 10 +++++----- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/framework/include/iotbus/iotbus_gpio.h b/framework/include/iotbus/iotbus_gpio.h index f589434..4426373 100644 --- a/framework/include/iotbus/iotbus_gpio.h +++ b/framework/include/iotbus/iotbus_gpio.h @@ -85,8 +85,7 @@ struct _iotbus_gpio_s; typedef struct _iotbus_gpio_s *iotbus_gpio_context_h; #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif typedef void (*gpio_isr_cb)(void *user_data); diff --git a/framework/include/iotbus/iotbus_i2c.h b/framework/include/iotbus/iotbus_i2c.h index 526b62b..0fc3401 100644 --- a/framework/include/iotbus/iotbus_i2c.h +++ b/framework/include/iotbus/iotbus_i2c.h @@ -56,8 +56,7 @@ typedef enum { } iotbus_i2c_mode_e; #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /** diff --git a/framework/include/iotbus/iotbus_pwm.h b/framework/include/iotbus/iotbus_pwm.h index 8e9df82..08e22fd 100644 --- a/framework/include/iotbus/iotbus_pwm.h +++ b/framework/include/iotbus/iotbus_pwm.h @@ -56,8 +56,7 @@ typedef enum { * Public Function */ #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /** diff --git a/framework/include/iotbus/iotbus_spi.h b/framework/include/iotbus/iotbus_spi.h index c9a6533..32103de 100644 --- a/framework/include/iotbus/iotbus_spi.h +++ b/framework/include/iotbus/iotbus_spi.h @@ -65,8 +65,7 @@ struct _iotbus_spi_s; typedef struct _iotbus_spi_s *iotbus_spi_context_h; #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /** diff --git a/framework/include/iotbus/iotbus_uart.h b/framework/include/iotbus/iotbus_uart.h index 5be2a0f..0febde5 100644 --- a/framework/include/iotbus/iotbus_uart.h +++ b/framework/include/iotbus/iotbus_uart.h @@ -53,8 +53,7 @@ struct _iotbus_uart_s; typedef struct _iotbus_uart_s *iotbus_uart_context_h; #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /** diff --git a/framework/src/arastorage/relation.h b/framework/src/arastorage/relation.h index cdd266c..08fedbb 100644 --- a/framework/src/arastorage/relation.h +++ b/framework/src/arastorage/relation.h @@ -76,19 +76,19 @@ #define GET_POS(a) ((a) % (sizeof(uint32_t) * 8)) /* This decides int array size to present all tuples in relation */ -#define GET_CURSOR_DATA_ARR_SIZE(a) (((a) / (sizeof(uint32_t)*8)) + 1) +#define GET_CURSOR_DATA_ARR_SIZE(a) (((a) / (sizeof(uint32_t) * 8)) + 1) /* Set a bit to 1 */ -#define BIT_SET(a, b) ((a) |= (1u<<(b))) +#define BIT_SET(a, b) ((a) |= (1u << (b))) /* Clear a bit to 0 */ -#define BIT_CLEAR(a, b) ((a) &= ~(1u<<(b))) +#define BIT_CLEAR(a, b) ((a) &= ~(1u << (b))) /* Reverse a bit */ -#define BIT_FLIP(a, b) ((a) ^= (1u<<(b))) +#define BIT_FLIP(a, b) ((a) ^= (1u << (b))) /* Check a bit whether 1 or 0 */ -#define BIT_CHECK(a, b) ((a) & (1u<<(b))) +#define BIT_CHECK(a, b) ((a) & (1u << (b))) /* Check cursor is empty or not */ #define IS_EMPTY_CURSOR(a) ((a) == NULL || (a)->total_rows <= 0 || (a)->cursor_rows <= 0) -- 2.7.4