From 7eac3100ea77eca64152444336180418938d5843 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 25 Jan 2011 00:52:10 +0100 Subject: libndr: move ndr_print_bool to ndr_basic.c Guenther --- librpc/ndr/libndr.h | 2 ++ librpc/ndr/ndr_basic.c | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'librpc') diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index 06cc93a891..ff20755700 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -571,4 +571,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_enum_uint16(struct ndr_push *ndr, int ndr_fl _PUBLIC_ enum ndr_err_code ndr_push_enum_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v); _PUBLIC_ enum ndr_err_code ndr_push_enum_uint1632(struct ndr_push *ndr, int ndr_flags, uint16_t v); +_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b); + #endif /* __LIBNDR_H__ */ diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index ff207f4bb9..d628faaa9a 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -1208,3 +1208,8 @@ _PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags) if (!data) return ret; return ret + data->length; } + +_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b) +{ + ndr->print(ndr, "%-25s: %s", name, b?"true":"false"); +} -- cgit