From 5c160198a1cf72af3b42bb7553d818751796bb0f Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 24 Jun 2009 18:48:49 +0200 Subject: [PATCH] print_error inline function --- server/util/util.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/server/util/util.h b/server/util/util.h index 7acbfe6..e8e317f 100644 --- a/server/util/util.h +++ b/server/util/util.h @@ -12,6 +12,7 @@ #include "talloc.h" #include "tevent.h" #include "ldb.h" +#include "util/sssd-i18n.h" extern const char *debug_prg_name; extern int debug_level; @@ -29,6 +30,16 @@ void debug_fn(const char *format, ...); } \ } while(0); +static inline void print_error(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, gettext(fmt), ap); + va_end(ap); +} + + #ifndef discard_const #define discard_const(ptr) ((void *)((uintptr_t)(ptr))) #endif -- 1.6.2.2