Skip to content

Commit

Permalink
Fix unused value being overwritten.
Browse files Browse the repository at this point in the history
Coverity Scan 1400727.
  • Loading branch information
ralight committed Jan 23, 2020
1 parent 6aa9b91 commit db62f98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/database.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,6 @@ int db__message_write(struct mosquitto_db *db, struct mosquitto *context)

DL_FOREACH_SAFE(context->msgs_in.inflight, tail, tmp){
msg_count++;
expiry_interval = 0;
if(tail->store->message_expiry_time){
if(now == 0){
now = time(NULL);
Expand All @@ -986,6 +985,8 @@ int db__message_write(struct mosquitto_db *db, struct mosquitto *context)
}else{
expiry_interval = tail->store->message_expiry_time - now;
}
}else{
expiry_interval = 0;
}
mid = tail->mid;
retries = tail->dup;
Expand Down

0 comments on commit db62f98

Please sign in to comment.