diff options
author | Martin Willi <martin@strongswan.org> | 2006-10-31 12:27:59 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-10-31 12:27:59 +0000 |
commit | db7ef62494fb6859df150e2b06b3ca91881d95af (patch) | |
tree | bd8d6e7e72ba0f27d9b34fa803d61eb243736208 /src/libstrongswan/utils/host.c | |
parent | de8b8a8c44c87130a2a5120a4c07262fa6806f6b (diff) | |
download | strongswan-db7ef62494fb6859df150e2b06b3ca91881d95af.tar.bz2 strongswan-db7ef62494fb6859df150e2b06b3ca91881d95af.tar.xz |
better split up of library files "types.h" & "definitions.h"
centralized all printf specifier character definitions
reuse of arginfo handlers
more cleanups
fixed more AMD64 issues
added DEBUG_LEVEL compile flag to exclude DBGn() statements
Diffstat (limited to 'src/libstrongswan/utils/host.c')
-rw-r--r-- | src/libstrongswan/utils/host.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/libstrongswan/utils/host.c b/src/libstrongswan/utils/host.c index 702d4bd4e..29c30753f 100644 --- a/src/libstrongswan/utils/host.c +++ b/src/libstrongswan/utils/host.c @@ -155,23 +155,11 @@ static int print(FILE *stream, const struct printf_info *info, } /** - * arginfo handler in printf() - */ -static int print_arginfo(const struct printf_info *info, size_t n, int *argtypes) -{ - if (n > 0) - { - argtypes[0] = PA_POINTER; - } - return 1; -} - -/** * register printf() handlers */ static void __attribute__ ((constructor))print_register() { - register_printf_function(HOST_PRINTF_SPEC, print, print_arginfo); + register_printf_function(PRINTF_HOST, print, arginfo_ptr); } /** @@ -179,7 +167,7 @@ static void __attribute__ ((constructor))print_register() */ static chunk_t get_address(private_host_t *this) { - chunk_t address = CHUNK_INITIALIZER; + chunk_t address = chunk_empty; switch (this->address.sa_family) { |