Skip to content

Commit

Permalink
avoid printf, save 10μs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgree committed Feb 24, 2025
1 parent c74c150 commit 754718a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions utils/try-summary.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ static int changes_detected = 0;
void show_change(char *local_file, char *msg) {
if (!changes_detected) {
changes_detected += 1;
printf("\nChanges detected in the following files:\n\n");
fputs("\nChanges detected in the following files:\n\n", stdout);
}

printf("%s (%s)\n", local_file, msg);
fputs(local_file, stdout);
fputs(" (", stdout);
fputs(msg, stdout);
fputs(")\n", stdout);
}

void usage(int status) {
Expand Down

0 comments on commit 754718a

Please sign in to comment.