Fix warnings with talloc_asprintf.
authorJeremy Allison <jra@samba.org>
Wed, 25 Nov 2009 22:47:36 +0000 (14:47 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 25 Nov 2009 22:47:36 +0000 (14:47 -0800)
Jeremy.

source3/printing/nt_printing.c

index 7c449f98e5aef9d35954900c243691565074101d..5f5f3445861abfc0c2d4190d2894f12f59b6a2ed 100644 (file)
@@ -1602,9 +1602,9 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
 ****************************************************************************/
 
 #define strip_driver_path(_mem_ctx, _element) do { \
 ****************************************************************************/
 
 #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);
 
        } \
 } while (0);