Skip to content

Commit

Permalink
Correct some broken printf() like format mismatches
Browse files Browse the repository at this point in the history
Fix two places where a printf()-style format string does not match the
arguments passed.

Reported-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
  • Loading branch information
dgibson committed Feb 27, 2017
1 parent 397d5ef commit f72508e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ int main(int argc, char *argv[])
alignsize = strtol(optarg, NULL, 0);
if (!is_power_of_2(alignsize))
die("Invalid argument \"%d\" to -a option\n",
optarg);
alignsize);
break;
case 'f':
force = true;
Expand Down
2 changes: 1 addition & 1 deletion util.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static inline void *xrealloc(void *p, size_t len)
void *new = realloc(p, len);

if (!new)
die("realloc() failed (len=%d)\n", len);
die("realloc() failed (len=%zd)\n", len);

return new;
}
Expand Down

0 comments on commit f72508e

Please sign in to comment.