lib/util Remove display_cd from d_printf()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 21 Jun 2011 02:51:30 +0000 (12:51 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 21 Jun 2011 05:54:38 +0000 (15:54 +1000)
The setting of the display charset is now done by
convert_string_talloc() selecting the right charset based on
CH_DISPLAY.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
lib/util/dprintf.c

index c79989b51701888cf7a2bb61921c9e78d2c4349e..a77eed84f5b776a218af0fe2fbac6d0c6923c827 100644 (file)
@@ -34,8 +34,6 @@
 #include "includes.h"
 #include "system/locale.h"
 
-static smb_iconv_t display_cd = (smb_iconv_t)-1;
-
 static int d_vfprintf(FILE *f, const char *format, va_list ap) 
 {
        char *p, *p2;
@@ -44,11 +42,6 @@ static int d_vfprintf(FILE *f, const char *format, va_list ap)
        bool cret;
        va_list ap2;
 
-       /* If there's nothing to convert, take a shortcut */
-       if (display_cd == (smb_iconv_t)-1) {
-               return vfprintf(f, format, ap);
-       }
-
        va_copy(ap2, ap);
        ret = vasprintf(&p, format, ap2);
        va_end(ap2);