Make init_doschar_table() static
authorVolker Lendecke <vl@samba.org>
Sat, 15 Dec 2007 23:17:41 +0000 (00:17 +0100)
committerJeremy Allison <jra@samba.org>
Sun, 16 Dec 2007 18:56:58 +0000 (10:56 -0800)
It's only called directly before init_valid_table() anyway, so move it there.
(This used to be commit b6d1d2428866712a550a354732e2386b4f87b67b)

source3/lib/charcnv.c
source3/lib/util_unistr.c

index 2515e6cef3e94f62fbca4886ff8290189671aab7..8a00b235ccc10c99eac953afed06d22ee47ff666 100644 (file)
@@ -178,7 +178,6 @@ void init_iconv(void)
                 * codepage changes? */
                /* XXX: Is the did_reload test too strict? */
                conv_silent = True;
-               init_doschar_table();
                init_valid_table();
                conv_silent = False;
        }
index 5bb8cbae9611f1320e20154687080d732592dda6..510f40e6111cb0a3cdf77034364fcac580a67b6e 100644 (file)
@@ -190,7 +190,7 @@ static int check_dos_char_slowly(smb_ucs2_t c)
  * Fill out doschar table the hard way, by examining each character
  **/
 
-void init_doschar_table(void)
+static void init_doschar_table(void)
 {
        int i, j, byteval;
 
@@ -228,6 +228,8 @@ void init_valid_table(void)
        const char *allowed = ".!#$%&'()_-@^`~";
        uint8 *valid_file;
 
+       init_doschar_table();
+
        if (mapped_file) {
                /* Can't unmap files, so stick with what we have */
                return;