From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> Instead of hard coding fprintf() into the library, use tracefs_warning() to allow the application control the output. Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- src/tracefs-sqlhist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tracefs-sqlhist.c b/src/tracefs-sqlhist.c index 016f3eb23725..ac4903c4d346 100644 --- a/src/tracefs-sqlhist.c +++ b/src/tracefs-sqlhist.c @@ -134,7 +134,7 @@ __hidden void sql_parse_error(struct sqlhist_bison *sb, const char *text, trace_seq_init(&s); if (!s.buffer) { - fprintf(stderr, "Error allocating internal buffer\n"); + tracefs_warning("Error allocating internal buffer\n"); return; } @@ -1097,7 +1097,7 @@ static int build_filter(struct tep_handle *tep, struct sqlhist_bison *sb, case FILTER_BIN_AND: cmp = TRACEFS_COMPARE_AND; break; case FILTER_STR_CMP: cmp = TRACEFS_COMPARE_RE; break; default: - fprintf(stderr, "Error invalid filter type '%d'", filter->type); + tracefs_warning("Error invalid filter type '%d'", filter->type); return ERANGE; } -- 2.34.1