treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / lib / api / debug.c
blob7708f0558e8c302e899685cf4ec4d3c972129fad
1 // SPDX-License-Identifier: GPL-2.0
2 #include <stdio.h>
3 #include <stdarg.h>
4 #include "debug.h"
5 #include "debug-internal.h"
7 static int __base_pr(const char *format, ...)
9 va_list args;
10 int err;
12 va_start(args, format);
13 err = vfprintf(stderr, format, args);
14 va_end(args);
15 return err;
18 libapi_print_fn_t __pr_warn = __base_pr;
19 libapi_print_fn_t __pr_info = __base_pr;
20 libapi_print_fn_t __pr_debug;
22 void libapi_set_print(libapi_print_fn_t warn,
23 libapi_print_fn_t info,
24 libapi_print_fn_t debug)
26 __pr_warn = warn;
27 __pr_info = info;
28 __pr_debug = debug;