Modify internal APIs to static 14/227414/4
authorhj kim <backto.kim@samsung.com>
Thu, 12 Mar 2020 01:14:18 +0000 (10:14 +0900)
committerhj kim <backto.kim@samsung.com>
Fri, 13 Mar 2020 05:54:57 +0000 (05:54 +0000)
Change-Id: I4e3a08e2937db6199419c702ffd6b47a17455255

src/thumbnail_util.c

index c234c95..0173faa 100644 (file)
@@ -28,7 +28,7 @@
 #define MAX_SIZE 16
 #define MAX_PATH_SIZE 4096
 
-int __thumbnail_util_replace_path(const char *path, char *replace_path)
+static int __thumbnail_util_replace_path(const char *path, char *replace_path)
 {
        if (!STRING_VALID(path)) {
                thumbnail_util_error("Invalid path");
@@ -50,7 +50,7 @@ int __thumbnail_util_replace_path(const char *path, char *replace_path)
        return THUMBNAIL_UTIL_ERROR_NONE;
 }
 
-int __thumbnail_util_error_capi(int internal_error)
+static int __thumbnail_util_error_capi(int internal_error)
 {
        switch (internal_error) {
        case MS_MEDIA_ERR_NONE:
@@ -69,14 +69,14 @@ int __thumbnail_util_error_capi(int internal_error)
        }
 }
 
-void __thumbnail_util_convert_itoa(int request_id, char **req_str)
+static void __thumbnail_util_convert_itoa(int request_id, char **req_str)
 {
        char buf[MAX_SIZE] = {0, };
 
        snprintf(buf, MAX_SIZE, "%d", request_id);
        *req_str = strndup(buf, strlen(buf));
 }
-void __thumbnail_util_extract_completed_cb(int error, int request_id, const char *path, int thumb_width, int thumb_height, unsigned char *thumb_data, int thumb_size, void *user_data)
+static void __thumbnail_util_extract_completed_cb(int error, int request_id, const char *path, int thumb_width, int thumb_height, unsigned char *thumb_data, int thumb_size, void *user_data)
 {
        thumbnail_extract_cb_s *_thumb_cb = (thumbnail_extract_cb_s *)user_data;
        char *request_id_str = NULL;
@@ -223,13 +223,13 @@ int thumbnail_util_destroy(thumbnail_h thumb)
        return ret;
 }
 
-int __thumbnail_util_get_file_ext(const char *file_path, char *file_ext, int max_len)
+static int __thumbnail_util_get_file_ext(const char *file_path, char *file_ext, int max_len)
 {
        int i = 0;
 
        for (i = (int)strlen(file_path); i >= 0; i--) {
                if ((file_path[i] == '.') && (i < (int)strlen(file_path))) {
-                       strncpy(file_ext, &file_path[i + 1], max_len);
+                       g_strlcpy(file_ext, &file_path[i + 1], max_len);
                        return THUMBNAIL_UTIL_ERROR_NONE;
                }