From: Taeyoung Kim Date: Fri, 1 Apr 2016 00:03:03 +0000 (+0900) Subject: common: apply Tizen Coding Rule X-Git-Tag: accepted/tizen/common/20160418.141528^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19353c73307d748daa811508f25ae3f353813bef;p=platform%2Fcore%2Fsystem%2Flibstorage.git common: apply Tizen Coding Rule - Space policy is applied. - Brace position policy is applied. Change-Id: I06e6e17e37018b0285c3eaf929a92640f7775f6c Signed-off-by: Taeyoung Kim --- diff --git a/include/log.h b/include/log.h index dfa287e..0c35119 100644 --- a/include/log.h +++ b/include/log.h @@ -28,21 +28,21 @@ #ifdef ENABLE_DLOG #include #define _D(fmt, arg...) \ - do { SLOGD(fmt, ##arg); } while(0) + do { SLOGD(fmt, ##arg); } while (0) #define _I(fmt, arg...) \ - do { SLOGI(fmt, ##arg); } while(0) + do { SLOGI(fmt, ##arg); } while (0) #define _W(fmt, arg...) \ - do { SLOGW(fmt, ##arg); } while(0) + do { SLOGW(fmt, ##arg); } while (0) #define _E(fmt, arg...) \ - do { SLOGE(fmt, ##arg); } while(0) + do { SLOGE(fmt, ##arg); } while (0) #define _SD(fmt, arg...) \ - do { SECURE_SLOGD(fmt, ##arg); } while(0) + do { SECURE_SLOGD(fmt, ##arg); } while (0) #define _SI(fmt, arg...) \ - do { SECURE_SLOGI(fmt, ##arg); } while(0) + do { SECURE_SLOGI(fmt, ##arg); } while (0) #define _SW(fmt, arg...) \ - do { SECURE_SLOGW(fmt, ##arg); } while(0) + do { SECURE_SLOGW(fmt, ##arg); } while (0) #define _SE(fmt, arg...) \ - do { SECURE_SLOGE(fmt, ##arg); } while(0) + do { SECURE_SLOGE(fmt, ##arg); } while (0) #else #define _D(...) do { } while (0) #define _I(...) do { } while (0) diff --git a/include/storage-expand.h b/include/storage-expand.h index 83f3491..c7b67a1 100644 --- a/include/storage-expand.h +++ b/include/storage-expand.h @@ -35,8 +35,7 @@ extern "C" { * @brief Enumeration of error codes for Storage. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ +typedef enum { STORAGE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ STORAGE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ STORAGE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ @@ -49,8 +48,7 @@ typedef enum * @brief Enumeration of the storage types. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ +typedef enum { STORAGE_TYPE_INTERNAL, /**< Internal device storage (built-in storage in a device, non-removable) */ STORAGE_TYPE_EXTERNAL, /**< External storage */ } storage_type_e; @@ -60,8 +58,7 @@ typedef enum * @brief Enumeration of the state of storage devices. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ +typedef enum { STORAGE_STATE_UNMOUNTABLE = -2, /**< Storage is present but cannot be mounted. Typically it happens if the file system of the storage is corrupted */ STORAGE_STATE_REMOVED = -1, /**< Storage is not present */ STORAGE_STATE_MOUNTED = 0, /**< Storage is present and mounted with read/write access */ @@ -139,8 +136,7 @@ int storage_get_root_directory(int storage_id, char **path); * @brief Enumeration of the storage directory types * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ +typedef enum { STORAGE_DIRECTORY_IMAGES, /**< Image directory */ STORAGE_DIRECTORY_SOUNDS, /**< Sounds directory */ STORAGE_DIRECTORY_VIDEOS, /**< Videos directory */ diff --git a/include/storage.h b/include/storage.h index 7370582..5df9a26 100644 --- a/include/storage.h +++ b/include/storage.h @@ -98,9 +98,9 @@ extern int storage_get_internal_memory_size64(struct statvfs *buf); extern int storage_get_external_memory_size(struct statvfs *buf); #else # ifdef __REDIRECT_NTH -extern int __REDIRECT_NTH (storage_get_external_memory_size, +extern int __REDIRECT_NTH(storage_get_external_memory_size, (struct statvfs *buf), storage_get_external_memory_size64) - __nonnull ((1)); + __nonnull((1)); # else # define storage_get_external_memory_size storage_get_external_memory_size64 # endif diff --git a/src/statvfs.c b/src/statvfs.c index c6c187b..52e030c 100644 --- a/src/statvfs.c +++ b/src/statvfs.c @@ -93,7 +93,7 @@ static inline char *trim_str(char *s) } static int config_parse(const char *file_name, int cb(struct parse_result *result, - void *user_data), void *user_data) + void *user_data), void *user_data) { FILE *f = NULL; struct parse_result result;