mirror of
https://github.com/pine64/bl_iot_sdk.git
synced 2024-10-04 14:00:01 +00:00
Merge pull request #4 from jevere/master
bl_sys_time.c: adds null pointer checks and extra spaces cleanup
This commit is contained in:
commit
6196686144
@ -49,6 +49,10 @@ int bl_sys_time_get(uint64_t *epoch)
|
||||
{
|
||||
int ms_diff;
|
||||
|
||||
if (!epoch) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (0 == epoch_time) {
|
||||
return -1;
|
||||
}
|
||||
@ -77,6 +81,10 @@ int bl_sys_time_sync_state(uint32_t *xTicksToJump)
|
||||
uint32_t deltaTickRtos;
|
||||
uint32_t deltaTickRtc;
|
||||
|
||||
if (!xTicksToJump) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!sync_init){
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user