summaryrefslogtreecommitdiff
path: root/heremaps-uc/src/heremaps-uc.c
diff options
context:
space:
mode:
Diffstat (limited to 'heremaps-uc/src/heremaps-uc.c')
-rw-r--r--heremaps-uc/src/heremaps-uc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/heremaps-uc/src/heremaps-uc.c b/heremaps-uc/src/heremaps-uc.c
index c40accf..2621092 100644
--- a/heremaps-uc/src/heremaps-uc.c
+++ b/heremaps-uc/src/heremaps-uc.c
@@ -75,8 +75,13 @@ static void read_file(heremaps_uc_app_data *ad)
ret = fread(buf, 15, 1, fp);
fclose(fp);
- data = strtok_r(buf, "=", &save_token);
- data = strtok_r(NULL, "=", &save_token);
+ if (ret > 0)
+ {
+ data = strtok_r(buf, "=", &save_token);
+ data = strtok_r(NULL, "=", &save_token);
+ }
+ else
+ LS_LOGE("UC_FILE read fail");
}
app_control_create(&reply);