summaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_subr/path.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2015-10-12 08:54:49 +0000
committerpeter <peter@FreeBSD.org>2015-10-12 08:54:49 +0000
commitc18b5d7f26f112be58bb1c4660799dea49f219ba (patch)
tree013c2e6845398e5a9ca4901dcc077769c7520e1d /subversion/libsvn_subr/path.c
parent91308aec6ca93cab82659cd43b3f6a83d366350b (diff)
downloadFreeBSD-src-c18b5d7f26f112be58bb1c4660799dea49f219ba.zip
FreeBSD-src-c18b5d7f26f112be58bb1c4660799dea49f219ba.tar.gz
Vendor import of subversion-1.9.2
Diffstat (limited to 'subversion/libsvn_subr/path.c')
-rw-r--r--subversion/libsvn_subr/path.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/subversion/libsvn_subr/path.c b/subversion/libsvn_subr/path.c
index 84368f3..aaeee75 100644
--- a/subversion/libsvn_subr/path.c
+++ b/subversion/libsvn_subr/path.c
@@ -1164,9 +1164,6 @@ svn_path_cstring_to_utf8(const char **path_utf8,
}
-/* Return a copy of PATH, allocated from POOL, for which control
- characters have been escaped using the form \NNN (where NNN is the
- octal representation of the byte's ordinal value). */
const char *
svn_path_illegal_path_escape(const char *path, apr_pool_t *pool)
{
@@ -1228,8 +1225,7 @@ svn_path_check_valid(const char *path, apr_pool_t *pool)
{
if (svn_ctype_iscntrl(*c))
{
- return svn_error_createf
- (SVN_ERR_FS_PATH_SYNTAX, NULL,
+ return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL,
_("Invalid control character '0x%02x' in path '%s'"),
(unsigned char)*c,
svn_path_illegal_path_escape(svn_dirent_local_style(path, pool),
@@ -1256,7 +1252,7 @@ svn_path_splitext(const char **path_root,
anything after it? We look for the "rightmost" period in the
string. */
last_dot = strrchr(path, '.');
- if (last_dot && (last_dot + 1 != '\0'))
+ if (last_dot && (*(last_dot + 1) != '\0'))
{
/* If we have a period, we need to make sure it occurs in the
final path component -- that there's no path separator
@@ -1303,12 +1299,12 @@ svn_path_resolve_repos_relative_url(const char **absolute_url,
_("Improper relative URL '%s'"),
relative_url);
- /* No assumptions are made about the canonicalization of the inut
+ /* No assumptions are made about the canonicalization of the input
* arguments, it is presumed that the output will be canonicalized after
* this function, which will remove any duplicate path separator.
*/
*absolute_url = apr_pstrcat(pool, repos_root_url, relative_url + 1,
- (char *)NULL);
+ SVN_VA_NULL);
return SVN_NO_ERROR;
}
OpenPOWER on IntegriCloud