Skip to content

Commit

Permalink
Use correct printf() flag for signed int
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharre committed Aug 25, 2017
1 parent e93371c commit 29bd5c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static void write_dep_information(dep_info *dep) {
int magic = atoi(getenv("REDO_MAGIC"));

/* TODO: casting time_t to long long is probably not entirely portable */
if (fprintf(fd, "%s:%lld.%.9ld:%010u:%s\n", hash,
if (fprintf(fd, "%s:%lld.%.9ld:%010d:%s\n", hash,
(long long)dep->ctime.tv_sec, dep->ctime.tv_nsec, magic, flags) < 0)
fatal("redo: failed to write to %s", dep->path);

Expand Down

0 comments on commit 29bd5c8

Please sign in to comment.