From 6f0f560eab7bd28110b1bd1d3bcf97e2690e3d50 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 9 Feb 2017 14:09:06 +0100 Subject: cosmetic: replace fprintf with LOGP socket.c still uses fprintf to output error messages. This commit replaces the fprintf with proper LOGP messages. Change-Id: Ia2993415d5f5c33ccd719af239ff59252d11b764 --- tests/socket/socket_test.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests/socket') diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c index 75088e5f..5b6abc42 100644 --- a/tests/socket/socket_test.c +++ b/tests/socket/socket_test.c @@ -28,8 +28,10 @@ #include #include +#include #include #include +#include #include "../config.h" @@ -71,8 +73,21 @@ static int test_sockinit(void) return 0; } +const struct log_info_cat default_categories[] = { +}; + +static struct log_info info = { + .cat = default_categories, + .num_cat = ARRAY_SIZE(default_categories), +}; + int main(int argc, char *argv[]) { + osmo_init_logging(&info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + test_sockinit(); - return 0; + + return EXIT_SUCCESS; } -- cgit v1.2.3