You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/16 20:56:01 UTC
svn commit: r1652510 - in /subversion/trunk/subversion/libsvn_fs_x:
caching.c fs.c fs_x.c lock.c
Author: stefan2
Date: Fri Jan 16 19:56:00 2015
New Revision: 1652510
URL: http://svn.apache.org/r1652510
Log:
In FSX, typedef a bunch of structs that are already named correctly but are
missing a typedef. Remove the "struct " prefix everywhere they get used.
* subversion/libsvn_fs_x/caching.c
(dump_cache_baton_t): Add typedef.
(dump_cache_statistics,
init_callbacks): Shorten uses.
* subversion/libsvn_fs_x/fs.c
(x_freeze_baton_t): Add typedef.
(x_freeze_body,
x_freeze_body2,
x_freeze): Shorten uses.
* subversion/libsvn_fs_x/fs_x.c
(upgrade_baton_t): Add typedef.
(upgrade_body,
svn_fs_x__upgrade): Shorten uses.
* subversion/libsvn_fs_x/lock.c
(lock_info_t): Add typedef.
(lock_body): Shorten uses.
(unlock_info_t): Add typedef.
(unlock_body,
svn_fs_x__unlock): Shorten uses.
Modified:
subversion/trunk/subversion/libsvn_fs_x/caching.c
subversion/trunk/subversion/libsvn_fs_x/fs.c
subversion/trunk/subversion/libsvn_fs_x/fs_x.c
subversion/trunk/subversion/libsvn_fs_x/lock.c
Modified: subversion/trunk/subversion/libsvn_fs_x/caching.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/caching.c?rev=1652510&r1=1652509&r2=1652510&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/caching.c Fri Jan 16 19:56:00 2015
@@ -172,21 +172,21 @@ warn_and_fail_on_cache_errors(svn_error_
#ifdef SVN_DEBUG_CACHE_DUMP_STATS
/* Baton to be used for the dump_cache_statistics() pool cleanup function, */
-struct dump_cache_baton_t
+typedef struct dump_cache_baton_t
{
/* the pool about to be cleaned up. Will be used for temp. allocations. */
apr_pool_t *pool;
/* the cache to dump the statistics for */
svn_cache__t *cache;
-};
+} dump_cache_baton_t;
/* APR pool cleanup handler that will printf the statistics of the
cache referenced by the baton in BATON_VOID. */
static apr_status_t
dump_cache_statistics(void *baton_void)
{
- struct dump_cache_baton_t *baton = baton_void;
+ dump_cache_baton_t *baton = baton_void;
apr_status_t result = APR_SUCCESS;
svn_cache__info_t info;
@@ -267,7 +267,7 @@ init_callbacks(svn_cache__t *cache,
/* schedule printing the access statistics upon pool cleanup,
* i.e. end of FSX session.
*/
- struct dump_cache_baton_t *baton;
+ dump_cache_baton_t *baton;
baton = apr_palloc(pool, sizeof(*baton));
baton->pool = pool;
Modified: subversion/trunk/subversion/libsvn_fs_x/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/fs.c?rev=1652510&r1=1652509&r2=1652510&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/fs.c Fri Jan 16 19:56:00 2015
@@ -150,17 +150,17 @@ x_set_errcall(svn_fs_t *fs,
return SVN_NO_ERROR;
}
-struct x_freeze_baton_t {
+typedef struct x_freeze_baton_t {
svn_fs_t *fs;
svn_fs_freeze_func_t freeze_func;
void *freeze_baton;
-};
+} x_freeze_baton_t;
static svn_error_t *
x_freeze_body(void *baton,
apr_pool_t *scratch_pool)
{
- struct x_freeze_baton_t *b = baton;
+ x_freeze_baton_t *b = baton;
svn_boolean_t exists;
SVN_ERR(svn_fs_x__exists_rep_cache(&exists, b->fs, scratch_pool));
@@ -176,7 +176,7 @@ static svn_error_t *
x_freeze_body2(void *baton,
apr_pool_t *scratch_pool)
{
- struct x_freeze_baton_t *b = baton;
+ x_freeze_baton_t *b = baton;
SVN_ERR(svn_fs_x__with_write_lock(b->fs, x_freeze_body, baton,
scratch_pool));
@@ -189,7 +189,7 @@ x_freeze(svn_fs_t *fs,
void *freeze_baton,
apr_pool_t *scratch_pool)
{
- struct x_freeze_baton_t b;
+ x_freeze_baton_t b;
b.fs = fs;
b.freeze_func = freeze_func;
Modified: subversion/trunk/subversion/libsvn_fs_x/fs_x.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/fs_x.c?rev=1652510&r1=1652509&r2=1652510&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/fs_x.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/fs_x.c Fri Jan 16 19:56:00 2015
@@ -593,14 +593,14 @@ svn_fs_x__open(svn_fs_t *fs,
/* Baton type bridging svn_fs_x__upgrade and upgrade_body carrying
* parameters over between them. */
-struct upgrade_baton_t
+typedef struct upgrade_baton_t
{
svn_fs_t *fs;
svn_fs_upgrade_notify_t notify_func;
void *notify_baton;
svn_cancel_func_t cancel_func;
void *cancel_baton;
-};
+} upgrade_baton_t;
/* Upgrade the FS given in upgrade_baton_t *)BATON to the latest format
* version. Apply options an invoke callback from that BATON.
@@ -613,7 +613,7 @@ static svn_error_t *
upgrade_body(void *baton,
apr_pool_t *scratch_pool)
{
- struct upgrade_baton_t *upgrade_baton = baton;
+ upgrade_baton_t *upgrade_baton = baton;
svn_fs_t *fs = upgrade_baton->fs;
int format, max_files_per_dir;
const char *format_path = svn_fs_x__path_format(fs, scratch_pool);
@@ -639,7 +639,7 @@ svn_fs_x__upgrade(svn_fs_t *fs,
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- struct upgrade_baton_t baton;
+ upgrade_baton_t baton;
baton.fs = fs;
baton.notify_func = notify_func;
baton.notify_baton = notify_baton;
Modified: subversion/trunk/subversion/libsvn_fs_x/lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/lock.c?rev=1652510&r1=1652509&r2=1652510&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/lock.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/lock.c Fri Jan 16 19:56:00 2015
@@ -845,12 +845,12 @@ check_lock(svn_error_t **fs_err,
return SVN_NO_ERROR;
}
-struct lock_info_t {
+typedef struct lock_info_t {
const char *path;
const char *component;
svn_lock_t *lock;
svn_error_t *fs_err;
-};
+} lock_info_t;
/* The body of svn_fs_x__lock(), which see.
@@ -874,7 +874,7 @@ lock_body(void *baton, apr_pool_t *pool)
apr_pool_t *iterpool = svn_pool_create(pool);
lb->infos = apr_array_make(lb->result_pool, lb->targets->nelts,
- sizeof(struct lock_info_t));
+ sizeof(lock_info_t));
/* Until we implement directory locks someday, we only allow locks
on files or non-existent paths. */
@@ -888,7 +888,7 @@ lock_body(void *baton, apr_pool_t *pool)
const svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i,
svn_sort__item_t);
const svn_fs_lock_target_t *target = item->value;
- struct lock_info_t info;
+ lock_info_t info;
svn_pool_clear(iterpool);
@@ -896,7 +896,7 @@ lock_body(void *baton, apr_pool_t *pool)
SVN_ERR(check_lock(&info.fs_err, info.path, target, lb, root, iterpool));
info.lock = NULL;
info.component = NULL;
- APR_ARRAY_PUSH(lb->infos, struct lock_info_t) = info;
+ APR_ARRAY_PUSH(lb->infos, lock_info_t) = info;
if (!info.fs_err)
++outstanding;
}
@@ -934,8 +934,7 @@ lock_body(void *baton, apr_pool_t *pool)
for (i = 0; i < lb->infos->nelts; ++i)
{
- struct lock_info_t *info = &APR_ARRAY_IDX(lb->infos, i,
- struct lock_info_t);
+ lock_info_t *info = &APR_ARRAY_IDX(lb->infos, i, lock_info_t);
const svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i,
svn_sort__item_t);
const svn_fs_lock_target_t *target = item->value;
@@ -1047,13 +1046,13 @@ check_unlock(svn_error_t **fs_err,
return SVN_NO_ERROR;
}
-struct unlock_info_t {
+typedef struct unlock_info_t {
const char *path;
const char *component;
svn_error_t *fs_err;
svn_boolean_t done;
int components;
-};
+} unlock_info_t;
/* The body of svn_fs_x__unlock(), which see.
@@ -1077,7 +1076,7 @@ unlock_body(void *baton, apr_pool_t *poo
apr_pool_t *iterpool = svn_pool_create(pool);
ub->infos = apr_array_make(ub->result_pool, ub->targets->nelts,
- sizeof(struct unlock_info_t));
+ sizeof( unlock_info_t));
SVN_ERR(ub->fs->vtable->youngest_rev(&youngest, ub->fs, pool));
SVN_ERR(ub->fs->vtable->revision_root(&root, ub->fs, youngest, pool));
@@ -1087,7 +1086,7 @@ unlock_body(void *baton, apr_pool_t *poo
const svn_sort__item_t *item = &APR_ARRAY_IDX(ub->targets, i,
svn_sort__item_t);
const char *token = item->value;
- struct unlock_info_t info = { 0 };
+ unlock_info_t info = { 0 };
svn_pool_clear(iterpool);
@@ -1112,7 +1111,7 @@ unlock_body(void *baton, apr_pool_t *poo
++outstanding;
}
- APR_ARRAY_PUSH(ub->infos, struct unlock_info_t) = info;
+ APR_ARRAY_PUSH(ub->infos, unlock_info_t) = info;
}
rev_0_path = svn_fs_x__path_rev_absolute(ub->fs, 0, pool);
@@ -1128,8 +1127,7 @@ unlock_body(void *baton, apr_pool_t *poo
for (j = 0; j < ub->infos->nelts; ++j)
{
- struct unlock_info_t *info = &APR_ARRAY_IDX(ub->infos, j,
- struct unlock_info_t);
+ unlock_info_t *info = &APR_ARRAY_IDX(ub->infos, j, unlock_info_t);
if (!info->fs_err && info->path)
{
@@ -1357,8 +1355,7 @@ svn_fs_x__unlock(svn_fs_t *fs,
err = svn_fs_x__with_write_lock(fs, unlock_body, &ub, scratch_pool);
for (i = 0; i < ub.infos->nelts; ++i)
{
- struct unlock_info_t *info = &APR_ARRAY_IDX(ub.infos, i,
- struct unlock_info_t);
+ unlock_info_t *info = &APR_ARRAY_IDX(ub.infos, i, unlock_info_t);
if (!cb_err && lock_callback)
{
if (!info->done && !info->fs_err)