You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2012/10/19 17:26:43 UTC
svn commit: r1400133 - in /subversion/trunk/subversion:
libsvn_repos/fs-wrap.c libsvn_subr/subst.c
Author: danielsh
Date: Fri Oct 19 15:26:43 2012
New Revision: 1400133
URL: http://svn.apache.org/viewvc?rev=1400133&view=rev
Log:
Minor optimisation.
* subversion/libsvn_subr/subst.c
(create_special_file_from_stream):
* subversion/libsvn_repos/fs-wrap.c
(svn_repos_fs_revision_prop):
s/strlen(x)/sizeof(x)-1/
Modified:
subversion/trunk/subversion/libsvn_repos/fs-wrap.c
subversion/trunk/subversion/libsvn_subr/subst.c
Modified: subversion/trunk/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/fs-wrap.c?rev=1400133&r1=1400132&r2=1400133&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/trunk/subversion/libsvn_repos/fs-wrap.c Fri Oct 19 15:26:43 2012
@@ -393,9 +393,9 @@ svn_repos_fs_revision_prop(svn_string_t
{
/* Only svn:author and svn:date are fetchable. */
if ((strncmp(propname, SVN_PROP_REVISION_AUTHOR,
- strlen(SVN_PROP_REVISION_AUTHOR)) != 0)
+ sizeof(SVN_PROP_REVISION_AUTHOR)-1) != 0)
&& (strncmp(propname, SVN_PROP_REVISION_DATE,
- strlen(SVN_PROP_REVISION_DATE)) != 0))
+ sizeof(SVN_PROP_REVISION_DATE)-1) != 0))
*value_p = NULL;
else
Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1400133&r1=1400132&r2=1400133&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Fri Oct 19 15:26:43 2012
@@ -1613,7 +1613,7 @@ create_special_file_from_stream(svn_stre
}
if (! strncmp(identifier, SVN_SUBST__SPECIAL_LINK_STR " ",
- strlen(SVN_SUBST__SPECIAL_LINK_STR " ")))
+ sizeof(SVN_SUBST__SPECIAL_LINK_STR " ")-1))
{
/* For symlinks, the type specific data is just a filesystem
path that the symlink should reference. */