From 1b40b74de032b36c199c4c65016e4736c09b6c81 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 13 Jul 2012 11:38:29 +0200 Subject: Pass opaque data to printf hooks and print_in_hook() --- src/libstrongswan/utils/host.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstrongswan/utils/host.c') diff --git a/src/libstrongswan/utils/host.c b/src/libstrongswan/utils/host.c index d3020a5d0..0f40a0dd4 100644 --- a/src/libstrongswan/utils/host.c +++ b/src/libstrongswan/utils/host.c @@ -100,7 +100,7 @@ METHOD(host_t, is_anyaddr, bool, /** * Described in header. */ -int host_printf_hook(char *dst, size_t dstlen, printf_hook_spec_t *spec, +int host_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec, const void *const *args) { private_host_t *this = *((private_host_t**)(args[0])); @@ -152,9 +152,9 @@ int host_printf_hook(char *dst, size_t dstlen, printf_hook_spec_t *spec, } if (spec->minus) { - return print_in_hook(dst, dstlen, "%-*s", spec->width, buffer); + return print_in_hook(data, "%-*s", spec->width, buffer); } - return print_in_hook(dst, dstlen, "%*s", spec->width, buffer); + return print_in_hook(data, "%*s", spec->width, buffer); } METHOD(host_t, get_address, chunk_t, -- cgit v1.2.3