Skip to content

Commit

Permalink
Cast saveparams[].seconds to long for %ld format specifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Mar 5, 2014
1 parent 8d01149 commit 9b40181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ void rewriteConfigSaveOption(struct rewriteConfigState *state) {
* resulting into no RDB persistence as expected. */
for (j = 0; j < server.saveparamslen; j++) {
line = sdscatprintf(sdsempty(),"save %ld %d",
server.saveparams[j].seconds, server.saveparams[j].changes);
(long) server.saveparams[j].seconds, server.saveparams[j].changes);
rewriteConfigRewriteLine(state,"save",line,1);
}
/* Mark "save" as processed in case server.saveparamslen is zero. */
Expand Down

0 comments on commit 9b40181

Please sign in to comment.