Add a few const statements to various odd bits of the tree. (Fixes some
authorAndrew Bartlett <abartlet@samba.org>
Sat, 29 Sep 2001 11:51:40 +0000 (11:51 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 29 Sep 2001 11:51:40 +0000 (11:51 +0000)
warnings)

source/lib/charcnv.c
source/lib/iconv.c
source/lib/util_file.c

index 5afc638a8d84e44110e4d0285b24c6bb245a60ad..adcd8b2aa944c49b74d5d1e8f41c0494626ba6f4 100644 (file)
@@ -94,7 +94,7 @@ size_t convert_string(charset_t from, charset_t to,
 {
        size_t i_len, o_len;
        size_t retval;
-       char* inbuf = (char*)src;
+       const char* inbuf = (const char*)src;
        char* outbuf = (char*)dest;
        static int initialised;
        smb_iconv_t descriptor;
index 05292264c218a38dd5dca8998fbab491d18498b0..cf9fabf8c6503ed0f2cac99226498644b9445625 100644 (file)
@@ -76,7 +76,7 @@ static size_t sys_iconv(void *cd,
   on systems that don't have iconv
  */
 size_t smb_iconv(smb_iconv_t cd, 
-                char **inbuf, size_t *inbytesleft,
+                const char **inbuf, size_t *inbytesleft,
                 char **outbuf, size_t *outbytesleft)
 {
        char cvtbuf[2048];
index 35b47a2cbb3aadb4acbfa2fae538eb3be9f61136..1d7b85f75cba511adc21a9367cc9e49a3ee0dffe 100644 (file)
@@ -406,7 +406,7 @@ char *fd_load(int fd, size_t *size)
 /****************************************************************************
 load a file into memory
 ****************************************************************************/
-char *file_load(char *fname, size_t *size)
+char *file_load(const char *fname, size_t *size)
 {
        int fd;
        char *p;
@@ -464,7 +464,7 @@ static char **file_lines_parse(char *p, size_t size, int *numlines)
 load a file into memory and return an array of pointers to lines in the file
 must be freed with file_lines_free(). 
 ****************************************************************************/
-char **file_lines_load(char *fname, int *numlines)
+char **file_lines_load(const char *fname, int *numlines)
 {
        char *p;
        size_t size;