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

Re: svn commit: r1461725 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Wed, 27 Mar 2013 21:13:52 +0200

stsp_at_apache.org wrote on Wed, Mar 27, 2013 at 17:19:58 -0000:
> Author: stsp
> Date: Wed Mar 27 17:19:57 2013
> New Revision: 1461725
>
> URL: http://svn.apache.org/r1461725
> Log:
> * subversion/libsvn_fs_fs/tree.c
> (escape_newline): Replace a hand-rolled loop with strchr() call.
>
> Modified:
> subversion/trunk/subversion/libsvn_fs_fs/tree.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1461725&r1=1461724&r2=1461725&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Wed Mar 27 17:19:57 2013
> @@ -2230,15 +2230,12 @@ escape_newline(const char *path, apr_poo
> static svn_error_t *
> check_newline(const char *path, apr_pool_t *pool)
> {
> - const char *c;
>
> + if (c)
> + return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL,
> + _("Invalid control character '0x%02x' in path '%s'"),
> + (unsigned char)*c, escape_newline(path, pool));
>

Any reason not to push this escape_newline() call down to
svn_error_createf() itself? i.e., apply escape_newline to every
stringy variadic argument (but not to the printf template).

> return SVN_NO_ERROR;
> }
>
>
Received on 2013-03-27 20:14:32 CET

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.