Fix defect detected by static analysis tool 03/191803/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 24 Oct 2018 04:47:42 +0000 (13:47 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 24 Oct 2018 04:47:42 +0000 (13:47 +0900)
Change-Id: Icbc76a347c89052e88a22d7f0d949bc0eead74d2

common/ma_config_mgr.c

index b66a11047f8732925fb83f028dc574e38f1f8160..cfbee5d33a1710607b555aef4d1b0ee2d2337ec2 100644 (file)
@@ -202,7 +202,7 @@ int ma_config_mgr_get_assistant_info(ma_ui_assistant_info_cb callback, void* use
 
        if (d) {
                while (NULL != (dir = readdir(d))) {
-                       if (suffix && dir->d_name && strlen(suffix) <= strlen(dir->d_name)) {
+                       if (suffix && strlen(suffix) <= strlen(dir->d_name)) {
                                if (0 == strcmp(dir->d_name + strlen(dir->d_name) - strlen(suffix), suffix)) {
                                        char fullpath[_POSIX_PATH_MAX];
                                        snprintf(fullpath, _POSIX_PATH_MAX - 1, "%s/%s", MA_ASSISTANT_INFO, dir->d_name);