Fix the svace issue (172902, 183416)
[apps/native/ug-bluetooth-efl.git] / common / src / libraries / bt-util.c
index c8d1f92..420660d 100644 (file)
@@ -7,7 +7,7 @@
 *           GirishAshok Joshi <girish.joshi@samsung.com>
 *           DoHyun Pyun <dh79.pyun@samsung.com>
 *
-* Licensed under the Flora License, Version 1.0 (the "License");
+* Licensed under the Flora License, Version 1.1 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
@@ -791,7 +791,7 @@ void _bt_util_destroy_dpm_context(void *ug_data)
 
        ugd = (bt_ug_data *)ug_data;
 
-       ret = dpm_context_remove_policy_changed_cb(ugd->dpm_handle, ugd->dpm_callback_id);
+       ret = dpm_remove_policy_changed_cb(ugd->dpm_handle, ugd->dpm_callback_id);
        if (ret != DPM_ERROR_NONE)
                BT_ERR("Fail to remove callback [%d]", ret);
 
@@ -888,7 +888,7 @@ static bool __bt_util_write_vcard_to_file(int fd, contacts_record_h record, bool
                }
 
                size_left = strlen(vcard_buff);
-               while (size_left) {
+               while (size_left > 0) {
                        int written = write(fd, vcard_buff, size_left);
                        if (written == -1) {
                                BT_ERR("write() failed: %d", errno);