common: fix build warning and coding rule issues 72/105572/3
authortaeyoung <ty317.kim@samsung.com>
Mon, 19 Dec 2016 04:57:27 +0000 (13:57 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Tue, 20 Dec 2016 08:50:44 +0000 (00:50 -0800)
Change-Id: I049f9e561596898d3df8c053d2b9ed086f6a94ec
Signed-off-by: taeyoung <ty317.kim@samsung.com>
src/core/common.c
src/core/common.h

index e26edd4..5338248 100644 (file)
@@ -109,17 +109,17 @@ int print_open_files(const char *mount_point)
                dp_child = opendir(buf);
                if (!dp_child)
                        continue;
-               while (1){
+               while (1) {
                        ret = readdir_r(dp_child, &entry_child, &dentry_child);
                        if (ret != 0 || dentry_child == NULL)
                                break;
 
-                       snprintf(check_path, PATH_MAX, "%s/%s",buf, dentry_child->d_name);
+                       snprintf(check_path, PATH_MAX, "%s/%s", buf, dentry_child->d_name);
 
-                       if(readlink(check_path, buf2, PATH_MAX) < 0)
+                       if (readlink(check_path, buf2, PATH_MAX) < 0)
                                continue;
 
-                       if(strncmp(buf2, mount_point, len) == 0)
+                       if (strncmp(buf2, mount_point, len) == 0)
                                _D("Process %s : Opened files - %s", cmdline, buf2);
                }
                closedir(dp_child);
index b71352e..f9e627b 100644 (file)
@@ -155,6 +155,7 @@ int umount_partition(const char *path, const bool force);
 int get_privilege(pid_t pid, char *name, size_t len);
 bool is_emulator(void);
 void watchdog_notify(void);
+int print_open_files(const char *mount_point);
 
 #endif /* __CORE_COMMON_H__ */