httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/i18n/unix xlate.c
Date Sun, 20 Aug 2000 04:14:51 GMT
trawick     00/08/19 21:14:50

  Modified:    src/lib/apr/i18n/unix xlate.c
  Log:
  Remove some casts in calls to iconv().
  
  Revision  Changes    Path
  1.12      +5 -4      apache-2.0/src/lib/apr/i18n/unix/xlate.c
  
  Index: xlate.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/i18n/unix/xlate.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- xlate.c	2000/08/06 06:07:06	1.11
  +++ xlate.c	2000/08/20 04:14:49	1.12
  @@ -174,7 +174,8 @@
   static void check_sbcs(apr_xlate_t *convset)
   {
       char inbuf[256], outbuf[256];
  -    char *inbufptr = inbuf, *outbufptr = outbuf;
  +    const char *inbufptr = inbuf;
  +    char *outbufptr = outbuf;
       size_t inbytes_left, outbytes_left;
       int i;
       size_t translated;
  @@ -184,7 +185,7 @@
       }
   
       inbytes_left = outbytes_left = sizeof(inbuf);
  -    translated = iconv(convset->ich, (const char **)&inbufptr, 
  +    translated = iconv(convset->ich, &inbufptr, 
                          &inbytes_left, &outbufptr, &outbytes_left);
       if (translated != (size_t) -1 &&
           inbytes_left == 0 &&
  @@ -275,10 +276,10 @@
       size_t translated;
   
       if (convset->ich != (iconv_t)-1) {
  -        char *inbufptr = (char *)inbuf;
  +        const char *inbufptr = inbuf;
           char *outbufptr = outbuf;
           
  -        translated = iconv(convset->ich, (const char **)&inbufptr, 
  +        translated = iconv(convset->ich, &inbufptr, 
                              inbytes_left, &outbufptr, outbytes_left);
           /* If everything went fine but we ran out of buffer, don't
            * report it as an error.  Caller needs to look at the two
  
  
  

Mime
View raw message