diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2023-02-10 09:56:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 09:56:44 +0200 |
commit | 8df421378ecfca6525ef07a2a9c37e1161f65f54 (patch) | |
tree | d0262141d6f198f998caa305d0c62b11b43ad0e9 /database/engine/journalfile.c | |
parent | 6db6daca180d795bf839ef93f34a049b3a242dcd (diff) |
Fix coverity issues (#14480)
* Fix coverity issues
382921
382924
382927
382928
382932
382933
382950
382990
383123
382952
382906
382908
382912
382914
382917
382918
382919
* 381508 Unchecked return value
* 382965 Dereference after null check
Diffstat (limited to 'database/engine/journalfile.c')
-rw-r--r-- | database/engine/journalfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/database/engine/journalfile.c b/database/engine/journalfile.c index de2b909c08..64d48d4fc0 100644 --- a/database/engine/journalfile.c +++ b/database/engine/journalfile.c @@ -40,7 +40,7 @@ static void update_metric_retention_and_granularity_by_uuid( .section = (Word_t) ctx, .first_time_s = first_time_s, .last_time_s = last_time_s, - .latest_update_every_s = update_every_s + .latest_update_every_s = (uint32_t) update_every_s }; uuid_copy(entry.uuid, *uuid); metric = mrg_metric_add_and_acquire(main_mrg, entry, &added); @@ -617,7 +617,7 @@ static void journalfile_restore_extent_metadata(struct rrdengine_instance *ctx, .section = (Word_t)ctx, .first_time_s = vd.start_time_s, .last_time_s = vd.end_time_s, - .latest_update_every_s = vd.update_every_s, + .latest_update_every_s = (uint32_t) vd.update_every_s, }; uuid_copy(entry.uuid, *temp_id); @@ -1128,7 +1128,7 @@ void *journalfile_v2_write_data_page(struct journal_v2_header *j2_header, void * data_page->delta_end_s = (uint32_t) (page_info->end_time_s - (time_t) (j2_header->start_time_ut) / USEC_PER_SEC); data_page->extent_index = page_info->extent_index; - data_page->update_every_s = page_info->update_every_s; + data_page->update_every_s = (uint32_t) page_info->update_every_s; data_page->page_length = (uint16_t) (ei ? ei->page_length : page_info->page_length); data_page->type = 0; |