Adjust coding style 96/155996/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 17 Oct 2017 02:14:46 +0000 (11:14 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 17 Oct 2017 02:14:46 +0000 (11:14 +0900)
Change-Id: I2fb7ef791ba42dd8623a855baf162d77732c967d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
include/mime_type.h
src/mime_type.c

index 350eabd..1963675 100755 (executable)
@@ -73,7 +73,7 @@ int mime_type_get_mime_type(const char *file_extension, char **mime_type);
  * @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error
  * @see mime_type_get_mime_type()
  */
-int mime_type_get_file_extension(const char *mime_type, char *** file_extension, int *length);
+int mime_type_get_file_extension(const char *mime_type, char ***file_extension, int *length);
 
 /**
  * @brief Gets the MIME type for the given data.
@@ -125,7 +125,7 @@ int mime_type_get_mime_type_for_file(const char *file_path, char **mime_type);
  * @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error
  * @see mime_type_get_mime_type()
  */
-int mime_type_get_icon(const char  *mime_type, char **icon);
+int mime_type_get_icon(const char *mime_type, char **icon);
 
 /**
  * @brief Gets the generic icon name for the given MIME type.
index fca73bb..3e3a110 100755 (executable)
@@ -32,7 +32,7 @@
 
 #define FILE_EXTENSION_DELIMITER '.'
 
-static const charmime_type_error_to_string(mime_type_error_e error)
+static const char *mime_type_error_to_string(mime_type_error_e error)
 {
        switch (error) {
        case MIME_TYPE_ERROR_NONE:
@@ -48,7 +48,7 @@ static const char* mime_type_error_to_string(mime_type_error_e error)
        }
 }
 
-static int mime_type_error(mime_type_error_e error, const charfunction, const char *description)
+static int mime_type_error(mime_type_error_e error, const char *function, const char *description)
 {
        if (description)
                LOGE("[%s] %s(0x%08x) : %s", function, mime_type_error_to_string(error), error, description);
@@ -82,7 +82,7 @@ int mime_type_get_mime_type(const char *file_extension, char **mime_type)
                return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the mime type from the shared MIME database");
        }
 
-       char * mime_type_dup = NULL;
+       char *mime_type_dup = NULL;
 
        mime_type_dup = strdup(xdg_mime_type);
 
@@ -94,7 +94,7 @@ int mime_type_get_mime_type(const char *file_extension, char **mime_type)
        return MIME_TYPE_ERROR_NONE;
 }
 
-int mime_type_get_file_extension(const char *mime_type, char *** file_extension, int *length)
+int mime_type_get_file_extension(const char *mime_type, char ***file_extension, int *length)
 {
        const char **xdg_file_extension = NULL;
        int xdg_file_extension_length = 0;
@@ -115,7 +115,7 @@ int mime_type_get_file_extension(const char *mime_type, char *** file_extension,
        while (xdg_file_extension[xdg_file_extension_length] != NULL)
                xdg_file_extension_length++;
 
-       file_extension_array = calloc(xdg_file_extension_length, sizeof(char*));
+       file_extension_array = calloc(xdg_file_extension_length, sizeof(char *));
 
        if (file_extension_array == NULL)
                return mime_type_error(MIME_TYPE_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
@@ -160,7 +160,7 @@ int mime_type_get_mime_type_for_file(const char *file_path, char **mime_type)
                return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the mime type from the shared MIME database");
        }
 
-       char * mime_type_dup = NULL;
+       char *mime_type_dup = NULL;
 
        mime_type_dup = strdup(xdg_mime_type);
 
@@ -187,7 +187,7 @@ int mime_type_get_mime_type_for_data(const void *data, size_t len, char **mime_t
                return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the mime type from the sahred MIME database");
        }
 
-       char * mime_type_dup = NULL;
+       char *mime_type_dup = NULL;
 
        mime_type_dup = strdup(xdg_mime_type);
 
@@ -211,7 +211,7 @@ int mime_type_get_icon(const char *mime_type, char **icon)
        if (xdg_icon == NULL)
                return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the icon from the shared MIME database");
 
-       char * icon_dup = NULL;
+       char *icon_dup = NULL;
 
        icon_dup = strdup(xdg_icon);
 
@@ -235,7 +235,7 @@ int mime_type_get_generic_icon(const char *mime_type, char **generic_icon)
        if (xdg_icon == NULL)
                return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the generic icon from the shared MIME database");
 
-       char * icon_dup = NULL;
+       char *icon_dup = NULL;
 
        icon_dup = strdup(xdg_icon);