You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2011/05/06 22:07:47 UTC
svn commit: r1100353 - in /subversion/trunk/subversion/libsvn_wc: wc_db.c
wc_db.h
Author: philip
Date: Fri May 6 20:07:47 2011
New Revision: 1100353
URL: http://svn.apache.org/viewvc?rev=1100353&view=rev
Log:
Make some op_depth functions return 64-bit values to avoid
accidental use of 32-bit values.
* subversion/libsvn_wc/wc_db.c
(relpath_depth, svn_wc__db_op_depth_for_upgrade): Return a 64-bit int.
(insert_base_node): Remove cast.
* subversion/libsvn_wc/wc_db.h
(svn_wc__db_op_depth_for_upgrade): Return a 64-bit int.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
subversion/trunk/subversion/libsvn_wc/wc_db.h
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1100353&r1=1100352&r2=1100353&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri May 6 20:07:47 2011
@@ -116,7 +116,7 @@
#define LIKE_ESCAPE_CHAR "#"
/* Calculates the depth of the relpath below "" */
-APR_INLINE static int relpath_depth(const char *relpath)
+APR_INLINE static apr_int64_t relpath_depth(const char *relpath)
{
int n = 1;
if (*relpath == '\0')
@@ -133,7 +133,7 @@ APR_INLINE static int relpath_depth(cons
}
-int svn_wc__db_op_depth_for_upgrade(const char *local_relpath)
+apr_int64_t svn_wc__db_op_depth_for_upgrade(const char *local_relpath)
{
return relpath_depth(local_relpath);
}
@@ -895,7 +895,7 @@ insert_base_node(void *baton,
STMT_INSERT_WORKING_NODE_FROM_BASE_COPY_PRESENCE));
SVN_ERR(svn_sqlite__bindf(stmt, "isit",
wcroot->wc_id, local_relpath,
- (apr_int64_t)relpath_depth(local_relpath),
+ relpath_depth(local_relpath),
presence_map, svn_wc__db_status_base_deleted));
SVN_ERR(svn_sqlite__step_done(stmt));
}
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1100353&r1=1100352&r2=1100353&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Fri May 6 20:07:47 2011
@@ -2704,7 +2704,7 @@ svn_wc__db_drop_root(svn_wc__db_t *db,
apr_pool_t *scratch_pool);
/* Return the OP_DEPTH for LOCAL_RELPATH. */
-int svn_wc__db_op_depth_for_upgrade(const char *local_relpath);
+apr_int64_t svn_wc__db_op_depth_for_upgrade(const char *local_relpath);
/* Set *HAVE_WORK TRUE if there is a working layer below the top layer and
*HAVE_BASE if there is a base layer. Set *STATUS to the status of the