Skip to content

Commit

Permalink
cppcheck : error in the required format of printf
Browse files Browse the repository at this point in the history
	- command.c :  static int show_ip(int argc, char **argv)
	- dump.c : int dmp_packet(const struct packet *m, const int flag)
  • Loading branch information
Raizo62 committed Jul 30, 2023
1 parent f3722c8 commit 9acd31b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,7 @@ static int show_ip(int argc, char **argv)
printf("DHCP SERVER : %s\n", inet_ntoa(in));
k = time_tick - vpc[id].ip4.dhcp.timetick;
k = vpc[id].ip4.dhcp.lease - k;
printf("DHCP LEASE : %u, %u/%u/%u\n",
printf("DHCP LEASE : %d, %u/%u/%u\n",
k > 0 ? k : 0,
vpc[id].ip4.dhcp.lease,
vpc[id].ip4.dhcp.renew,
Expand Down
2 changes: 1 addition & 1 deletion src/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int dmp_packet(const struct packet *m, const int flag)

gettimeofday(&tv, 0);
usec = (tv.tv_sec - gtv.tv_sec) * 1000000 + tv.tv_usec - gtv.tv_usec;
printf("\n\033[32m%04d.%d\033[0m", usec / 1000000, usec % 1000000);
printf("\n\033[32m%04u.%u\033[0m", usec / 1000000, usec % 1000000);
if (flag & DMP_MAC) {
printf(" ");
printf("\033[33m");
Expand Down

0 comments on commit 9acd31b

Please sign in to comment.