Skip to content

Commit

Permalink
[tsdb] remove #pragma pack and rename fdb_tsl_iter_reverse.
Browse files Browse the repository at this point in the history
  • Loading branch information
armink committed May 18, 2022
1 parent e3b1bee commit 536c1f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion inc/flashdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool fdb_kv_iterate (fdb_kvdb_t db, fdb_kv_iterator_t itr);
/* Time series log API like a TSDB */
fdb_err_t fdb_tsl_append (fdb_tsdb_t db, fdb_blob_t blob);
void fdb_tsl_iter (fdb_tsdb_t db, fdb_tsl_cb cb, void *cb_arg);
void fdb_tsl_iter_rev (fdb_tsdb_t db, fdb_tsl_cb cb, void *arg)
void fdb_tsl_iter_reverse(fdb_tsdb_t db, fdb_tsl_cb cb, void *cb_arg);
void fdb_tsl_iter_by_time(fdb_tsdb_t db, fdb_time_t from, fdb_time_t to, fdb_tsl_cb cb, void *cb_arg);
size_t fdb_tsl_query_count (fdb_tsdb_t db, fdb_time_t from, fdb_time_t to, fdb_tsl_status_t status);
fdb_err_t fdb_tsl_set_status (fdb_tsdb_t db, fdb_tsl_t tsl, fdb_tsl_status_t status);
Expand Down
6 changes: 1 addition & 5 deletions src/fdb_tsdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@
if (result != FDB_NO_ERR) return result; \
} while(0);

#pragma pack(push,1)

struct sector_hdr_data {
uint8_t status[FDB_STORE_STATUS_TABLE_SIZE]; /**< sector store status @see fdb_sector_store_status_t */
uint32_t magic; /**< magic word(`T`, `S`, `L`, `0`) */
Expand All @@ -96,8 +94,6 @@ struct log_idx_data {
};
typedef struct log_idx_data *log_idx_data_t;

#pragma pack(pop)

struct query_count_args {
fdb_tsl_status_t status;
size_t count;
Expand Down Expand Up @@ -450,7 +446,7 @@ fdb_err_t fdb_tsl_append(fdb_tsdb_t db, fdb_blob_t blob)
* @param cb callback
* @param arg callback argument
*/
void fdb_tsl_iter_rev(fdb_tsdb_t db, fdb_tsl_cb cb, void *arg)
void fdb_tsl_iter_reverse(fdb_tsdb_t db, fdb_tsl_cb cb, void *arg)
{
struct tsdb_sec_info sector;
uint32_t sec_addr, traversed_len = 0;
Expand Down

0 comments on commit 536c1f3

Please sign in to comment.