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: Id49650ddb2e718fc9054963c8eac5ec785e35ad9
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;