summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2016-03-16 09:04:13 +0900
committerMinje Ahn <minje.ahn@samsung.com>2016-03-16 09:04:13 +0900
commit4f4c8efd1e7a1543150da6e5546bbb360e2525c8 (patch)
tree8d0b47dff167ba3d2e8cea719fcd9e6e7052131f /src
parent5498210f1f7e9c8b2dd8e94579c64ab14fb6f6a8 (diff)
downloadlibmedia-thumbnail-4f4c8efd1e7a1543150da6e5546bbb360e2525c8.tar.gz
libmedia-thumbnail-4f4c8efd1e7a1543150da6e5546bbb360e2525c8.tar.bz2
libmedia-thumbnail-4f4c8efd1e7a1543150da6e5546bbb360e2525c8.zip
Fix build warning
Change-Id: I7c9bfb5b06ded6925506b96c50e166bfa05dd9a2 Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/media-thumb-internal.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index ad38f0e..73c72ce 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -1252,6 +1252,7 @@ int _media_thumb_video(const char *origin_path,
static char* _media_thumb_mmc_get_path(uid_t uid)
{
+ int ret = 0;
char *result_psswd = NULL;
struct group *grpinfo = NULL;
if (uid == getuid()) {
@@ -1280,7 +1281,11 @@ static char* _media_thumb_mmc_get_path(uid_t uid)
thumb_err("UID [%d] does not belong to 'users' group!", uid);
return NULL;
}
- asprintf(&result_psswd, "%s/share/media/.thumb/mmc", userinfo->pw_dir);
+ ret = asprintf(&result_psswd, "%s/share/media/.thumb/mmc", userinfo->pw_dir);
+ if (ret == -1) {
+ thumb_err("asprintf failed");
+ return NULL;
+ }
}
return result_psswd;
@@ -1288,6 +1293,7 @@ static char* _media_thumb_mmc_get_path(uid_t uid)
static char* _media_thumb_phone_get_path(uid_t uid)
{
+ int ret = 0;
char *result_psswd = NULL;
struct group *grpinfo = NULL;
if (uid == getuid()) {
@@ -1316,7 +1322,11 @@ static char* _media_thumb_phone_get_path(uid_t uid)
thumb_err("UID [%d] does not belong to 'users' group!", uid);
return NULL;
}
- asprintf(&result_psswd, "%s/share/media/.thumb/phone", userinfo->pw_dir);
+ ret = asprintf(&result_psswd, "%s/share/media/.thumb/phone", userinfo->pw_dir);
+ if (ret == -1) {
+ thumb_err("asprintf failed");
+ return NULL;
+ }
}
return result_psswd;