Skip to content

Commit efb6159

Browse files
mzrgitster
authored andcommitted
bundle-uri: send debug output to given FILE * stream
d796ced (bundle-uri: unit test "key=value" parsing, 2022-10-12) introduced the print_bundle_list() function, which takes a "FILE *fp" to write the output to. Later with c93c3d2 (bundle-uri: parse bundle.heuristic=creationToken, 2023-01-31) the function started showing additional information, which is always written to the standard output stream. It does not look like a deliberate decision to do so, and it does not hurt, as all callers of the function passes stdout to it. We could change the function not to take fp and always write to the standard output to simplify, but let's use the FILE *fp provided by the caller consistently to write out output. Signed-off-by: Jan Mazur <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 54a3711 commit efb6159

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundle-uri.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void print_bundle_list(FILE *fp, struct bundle_list *list)
115115
int i;
116116
for (i = 0; i < BUNDLE_HEURISTIC__COUNT; i++) {
117117
if (heuristics[i].heuristic == list->heuristic) {
118-
printf("\theuristic = %s\n",
118+
fprintf(fp, "\theuristic = %s\n",
119119
heuristics[list->heuristic].name);
120120
break;
121121
}

0 commit comments

Comments
 (0)