From c5b234c9cde079aa45ed93c42b5ed5e66ac969a3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 25 Nov 2009 14:47:36 -0800 Subject: Fix warnings with talloc_asprintf. Jeremy. --- source3/printing/nt_printing.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 7c449f98e5..5f5f344586 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1602,9 +1602,9 @@ static uint32 get_correct_cversion(struct pipes_struct *p, ****************************************************************************/ #define strip_driver_path(_mem_ctx, _element) do { \ - if ((_p = strrchr(_element, '\\')) != NULL) { \ - _element = talloc_asprintf(_mem_ctx, _p+1); \ - W_ERROR_HAVE_NO_MEMORY(_element); \ + if ((_p = strrchr((_element), '\\')) != NULL) { \ + (_element) = talloc_asprintf((_mem_ctx), "%s", _p+1); \ + W_ERROR_HAVE_NO_MEMORY((_element)); \ } \ } while (0); -- cgit