Skip to content

Commit c2c0e2d

Browse files
committed
test/datatype/partial: make all output on stderr
Trivial updates to make all the output appear on stderr (vs. just some of it on stderr and other parts of it on stdout). Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
1 parent 4946e67 commit c2c0e2d

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

test/datatype/partial.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,32 @@ static void show_neighborhood(double *ptr, int how_many, bool show_hex)
3939
{
4040
int i;
4141

42-
printf("%12p: ", (void *) ptr);
42+
fprintf(stderr, "%12p: ", (void *) ptr);
4343
for (i = -how_many; i < how_many; i++) {
4444
if (0 == i) {
45-
printf(" <%g> ", ptr[i]);
45+
fprintf(stderr, " <%g> ", ptr[i]);
4646
} else {
47-
printf(" %g ", ptr[i]);
47+
fprintf(stderr, " %g ", ptr[i]);
4848
}
4949
}
5050
if (show_hex) {
5151
char *cptr = (char *) ptr;
52-
printf("\n : ");
52+
fprintf(stderr, "\n : ");
5353
for (i = -how_many; i < how_many; i++) {
54-
if (0 == i)
55-
printf(" <");
54+
if (0 == i) {
55+
fprintf(stderr, " <");
56+
}
5657
for (size_t j = 0; j < sizeof(double); j++) {
57-
printf("%02x", cptr[i * sizeof(double) + j]);
58+
fprintf(stderr, "%02x", cptr[i * sizeof(double) + j]);
59+
}
60+
if (0 == i) {
61+
fprintf(stderr, "> ");
62+
} else {
63+
fprintf(stderr, " ");
5864
}
59-
if (0 == i)
60-
printf("> ");
61-
else
62-
printf(" ");
6365
}
6466
}
65-
printf("\n\n");
67+
fprintf(stderr, "\n\n");
6668
}
6769

6870
/**

0 commit comments

Comments
 (0)