[attach-panel] Fixed coding rule error and svace error 88/74388/2 accepted/tizen/mobile/20160620.081949 submit/tizen/20160620.043615
authormoon87.park <moon87.park@samsung.com>
Tue, 14 Jun 2016 06:27:07 +0000 (15:27 +0900)
committermoon87.park <moon87.park@samsung.com>
Tue, 14 Jun 2016 10:58:41 +0000 (19:58 +0900)
Change-Id: I54e6f8746e9e208dde30597c367cdfd89df9a334

src/attach_panel.c

index c81c2e513c0d0501772918718413c8cbd3efd825..a19f065e03dc96627ec23f45d83b31a2bc0edd26 100644 (file)
@@ -417,7 +417,7 @@ static void __iter_cb(const char *key, const int type, bundle_keyval_t *kv, void
 #define SMACK_LABEL_LEN 255
 static int __check_privilege(const char *privilege)
 {
-       cynara *p_cynara;
+       cynara *p_cynara = NULL;
 
        int fd = 0;
        int ret = 0;
@@ -430,7 +430,7 @@ static int __check_privilege(const char *privilege)
        goto_if(ret != CYNARA_API_SUCCESS, OUT);
 
        fd = open("/proc/self/attr/current", O_RDONLY);
-       goto_if (fd < 0, OUT);
+       goto_if(fd < 0, OUT);
 
        ret = read(fd, subject_label, SMACK_LABEL_LEN);
        if (ret < 0) {
@@ -443,7 +443,7 @@ static int __check_privilege(const char *privilege)
        snprintf(uid, 10, "%d", getuid());
 
        ret = cynara_check(p_cynara, subject_label, client_session, uid, privilege);
-       goto_if (ret != CYNARA_API_ACCESS_ALLOWED, OUT);
+       goto_if(ret != CYNARA_API_ACCESS_ALLOWED, OUT);
 
        ret = 0;