Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E29CDFE5D for ; Wed, 27 Mar 2013 19:14:26 +0000 (UTC) Received: (qmail 61009 invoked by uid 500); 27 Mar 2013 19:14:26 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 60939 invoked by uid 500); 27 Mar 2013 19:14:26 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 60899 invoked by uid 99); 27 Mar 2013 19:14:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Mar 2013 19:14:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [78.47.87.163] (HELO mx0.elegosoft.com) (78.47.87.163) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Mar 2013 19:14:20 +0000 Received: from localhost (localhost [127.0.0.1]) by mx0.elegosoft.com (Postfix) with ESMTP id 1FD2ADE052; Wed, 27 Mar 2013 20:13:59 +0100 (CET) Received: from mx0.elegosoft.com ([127.0.0.1]) by localhost (mx0.elegosoft.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fOpRAKlylJE2; Wed, 27 Mar 2013 20:13:59 +0100 (CET) Received: from lp-shahaf.local (unknown [109.67.220.196]) by mx0.elegosoft.com (Postfix) with ESMTPSA id 98A96DE038; Wed, 27 Mar 2013 20:13:58 +0100 (CET) Date: Wed, 27 Mar 2013 21:13:52 +0200 From: Daniel Shahaf To: dev@subversion.apache.org Cc: commits@subversion.apache.org Subject: Re: svn commit: r1461725 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c Message-ID: <20130327191352.GA3073@lp-shahaf.local> References: <20130327171958.1D8AC23888FE@eris.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130327171958.1D8AC23888FE@eris.apache.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Checked: Checked by ClamAV on apache.org stsp@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; > } > >