[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r39219 - trunk/subversion/libsvn_subr

From: Greg Stein <gstein_at_gmail.com>
Date: Sat, 12 Sep 2009 16:24:41 -0400

On Thu, Sep 10, 2009 at 10:32, C. Michael Pilato <cmpilato_at_collab.net> wrote:
>...
> +++ trunk/subversion/libsvn_subr/io.c   Thu Sep 10 07:32:11 2009        (r39219)
>...
> @@ -2612,6 +2624,7 @@ svn_io_parse_mimetypes_file(apr_hash_t *
>           for (i = 1; i < tokens->nelts; i++)
>             {
>               const char *ext = APR_ARRAY_IDX(tokens, i, const char *);
> +              fileext_tolower((char *)ext);
>               apr_hash_set(types, ext, APR_HASH_KEY_STRING, type);

Casts are always a yellow flag. In the above case, how about simply
declaring EXT as non-const? (and strip the const in the IDX())

>...
> @@ -2667,6 +2673,7 @@ svn_io_detect_mimetype2(const char **mim
>     {
>       const char *type_from_map, *path_ext;
>       svn_path_splitext(NULL, &path_ext, file, pool);
> +      fileext_tolower((char *)path_ext);
>       if ((type_from_map = apr_hash_get(mimetype_map, path_ext,
>                                         APR_HASH_KEY_STRING)))
>         {

This one is a bit tougher, unless we alter the definition of
splitext(). Not sure that makes sense tho...

>...

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2394113
Received on 2009-09-12 22:24:57 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.