diff options
author | Minje Ahn <minje.ahn@samsung.com> | 2024-04-15 09:54:27 +0900 |
---|---|---|
committer | Minje Ahn <minje.ahn@samsung.com> | 2024-04-22 07:49:54 +0900 |
commit | 1a2f51762f110cbd1840ae23c64d6b19d58c41ad (patch) | |
tree | 373e0ff2160ed3ab8edbb8a1335e01c85b25ffd9 /include | |
parent | 03e522ecd795152eea7cbfe53b82dc5c09b6ea03 (diff) | |
download | media-content-1a2f51762f110cbd1840ae23c64d6b19d58c41ad.tar.gz media-content-1a2f51762f110cbd1840ae23c64d6b19d58c41ad.tar.bz2 media-content-1a2f51762f110cbd1840ae23c64d6b19d58c41ad.zip |
Macro and defines cleanup
Remove and use directly
SAFE_STRLCPY
SAFE_STRLCAT
MEDIA_CONTENT_INSERT_FILES_PATH
MEDIA_CONTENT_EMPTY_STRING
Moved to test code
SAFE_FREE
Change-Id: I13d208fa3f2e3e1ac3659eaac9b8797c3d0a876d
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media_info_private.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/media_info_private.h b/include/media_info_private.h index e7675a4..2dc8479 100644 --- a/include/media_info_private.h +++ b/include/media_info_private.h @@ -56,15 +56,9 @@ extern "C" { #define LOG_TAG "CAPI_CONTENT_MEDIA_CONTENT" -#define SAFE_STRLCPY(dst, src, n) g_strlcpy(dst, src, n); -#define SAFE_STRLCAT(dst, src, n) g_strlcat(dst, src, n); -#define SAFE_FREE(src) {if (src) {free(src); src = NULL; } } -#define STRING_VALID(str) ((str != NULL && strlen(str) > 0) ? TRUE : FALSE) -#define SQLITE3_FINALIZE(x) {if (x != NULL) sqlite3_finalize(x); } -#define SQLITE3_SAFE_FREE(x) {if (x != NULL) {sqlite3_free(x); x = NULL; } } - -#define MEDIA_CONTENT_INSERT_FILES_PATH "/tmp" -#define MEDIA_CONTENT_EMPTY_STRING "" +#define STRING_VALID(str) (str && strlen(str) > 0) +#define SQLITE3_FINALIZE(x) {if (x) sqlite3_finalize(x); } +#define SQLITE3_SAFE_FREE(x) {if (x) {sqlite3_free(x); x = NULL; } } #define MAX_QUERY_SIZE 4096 #define MAX_PATH_LEN 4096 |