Use local variable 'pkgId' instead of member variable 'm_pkgId'
authorSoo-Hyun Choi <sh9.choi@samsung.com>
Thu, 19 Sep 2013 05:52:47 +0000 (14:52 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Mon, 23 Sep 2013 08:00:45 +0000 (08:00 +0000)
[Issue#]   N/A
[Problem]  'm_pkgId' is given as a parameter, pkgId, of setLabelForSharedDir(),
           but it still uses 'm_pkgId' inside of setLabelForSharedDir() function.
[Cause]    Declared a local variable which was not used correctly.
[Solution] Changed 'm_pkgId' to 'pkgId'.

Change-Id: If361b7481b49ab23b69ea947d01293f93105b0e3

src/jobs/widget_install/task_smack.cpp

index 2dc854c..cfac8b0 100644 (file)
@@ -227,14 +227,14 @@ void TaskSmack::StepAbortSmack()
 bool TaskSmack::setLabelForSharedDir(const char* pkgId)
 {
     /* /shared directory */
-    if (PC_OPERATION_SUCCESS != perm_app_setup_path(m_pkgId,
+    if (PC_OPERATION_SUCCESS != perm_app_setup_path(pkgId,
                 m_context.locations->getSharedRootDir().c_str(),
                 APP_PATH_ANY_LABEL, "_")) {
         _W("Add label to %s", m_context.locations->getUserDataRootDir().c_str());
     }
 
     /* /shared/res directory */
-    if (PC_OPERATION_SUCCESS != perm_app_setup_path(m_pkgId,
+    if (PC_OPERATION_SUCCESS != perm_app_setup_path(pkgId,
                 m_context.locations->getSharedResourceDir().c_str(),
                 APP_PATH_ANY_LABEL, "_")) {
         _W("Add label to %s", m_context.locations->getSharedResourceDir().c_str());
@@ -255,7 +255,7 @@ bool TaskSmack::setLabelForSharedDir(const char* pkgId)
 
         _D("sha1 label string : %s", sha1String.c_str());
 
-        if (PC_OPERATION_SUCCESS != perm_app_setup_path(m_pkgId,
+        if (PC_OPERATION_SUCCESS != perm_app_setup_path(pkgId,
                     m_context.locations->getSharedTrustedDir().c_str(),
                     APP_PATH_GROUP_RW, sha1String.c_str())) {
             _W("Add label to %s", m_context.locations->getBinaryDir().c_str());
@@ -263,7 +263,7 @@ bool TaskSmack::setLabelForSharedDir(const char* pkgId)
     }
 
     /* /shared/data directory */
-    if (PC_OPERATION_SUCCESS != perm_app_setup_path(m_pkgId,
+    if (PC_OPERATION_SUCCESS != perm_app_setup_path(pkgId,
                 m_context.locations->getSharedDataDir().c_str(),
                 APP_PATH_PUBLIC_RO)) {
         _W("Add label to %s", m_context.locations->getSharedDataDir().c_str());