Skip to content

Commit

Permalink
db_flatstore: use unsigned long long for printing time_t value
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed May 4, 2023
1 parent 254c145 commit 20561b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/db_flatstore/flat_cmd.c
Expand Up @@ -142,7 +142,7 @@ int flat_put(db_res_t* res, db_cmd_t* cmd)
break;

case DB_DATETIME:
if (fprintf(f, "%u", (unsigned int)cmd->vals[i].v.time) < 0)
if (fprintf(f, "%llu", (unsigned long long)cmd->vals[i].v.time) < 0)
goto error;
break;

Expand Down
2 changes: 1 addition & 1 deletion src/modules/db_flatstore/km_flatstore.c
Expand Up @@ -207,7 +207,7 @@ int flat_db_insert(const db1_con_t* h, const db_key_t* k, const db_val_t* v,
break;

case DB1_DATETIME:
fprintf(f, "%u", (unsigned int)VAL_TIME(v + i));
fprintf(f, "%llu", (unsigned long long)VAL_TIME(v + i));
break;

case DB1_BLOB:
Expand Down

0 comments on commit 20561b6

Please sign in to comment.