store_local_irk function's return type is bool. It can't return the
negative value. So the error logic will not work.
Change-Id: Idbf919de8db1ed56054a6d6fbe862d3315364c37
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
if (access(LOCAL_IRK_DIRNAME"/"LOCAL_IRK_FILENAME, F_OK) < 0) {
adapter->local_irk = generate_irk();
- if (store_local_irk(adapter) < 0) {
+ if (store_local_irk(adapter) == false) {
error("Cannot store Local IRK");
g_free(adapter->local_irk);
return false;