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 2010/12/10 19:18:43 UTC
svn commit: r1044467 - in /subversion/trunk/subversion: libsvn_client/
libsvn_fs_base/ libsvn_fs_base/util/ libsvn_fs_fs/ libsvn_ra/
libsvn_ra_serf/ libsvn_ra_svn/ libsvn_repos/ libsvn_subr/ libsvn_wc/ svn/
svnadmin/ svndumpfilter/ svnlook/ svnrdump/ s...
Author: danielsh
Date: Fri Dec 10 18:18:42 2010
New Revision: 1044467
URL: http://svn.apache.org/viewvc?rev=1044467&view=rev
Log:
Fix error leaks.
* everywhere:
Add missing SVN_ERR() calls.
* subversion/libsvn_repos/load-fs-vtable.c
(make_node_baton): Return an svn_error_t *.
(new_node_record): Track return type change.
* subversion/svnadmin/main.c (main),
subversion/svndumpfilter/main.c (main),
subversion/svnlook/main.c (main),
subversion/svnrdump/svnrdump.c (main),
subversion/svnsync/main.c (main):
Use SVN_INT_ERR() around subcommand_help() or help_cmd().
Modified:
subversion/trunk/subversion/libsvn_client/commit_util.c
subversion/trunk/subversion/libsvn_client/deprecated.c
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_client/repos_diff.c
subversion/trunk/subversion/libsvn_fs_base/reps-strings.c
subversion/trunk/subversion/libsvn_fs_base/tree.c
subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
subversion/trunk/subversion/libsvn_ra/compat.c
subversion/trunk/subversion/libsvn_ra_serf/commit.c
subversion/trunk/subversion/libsvn_ra_serf/options.c
subversion/trunk/subversion/libsvn_ra_serf/property.c
subversion/trunk/subversion/libsvn_ra_serf/serf.c
subversion/trunk/subversion/libsvn_ra_serf/update.c
subversion/trunk/subversion/libsvn_ra_svn/client.c
subversion/trunk/subversion/libsvn_repos/dump.c
subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c
subversion/trunk/subversion/libsvn_subr/mergeinfo.c
subversion/trunk/subversion/libsvn_wc/adm_ops.c
subversion/trunk/subversion/libsvn_wc/deprecated.c
subversion/trunk/subversion/libsvn_wc/props.c
subversion/trunk/subversion/libsvn_wc/status.c
subversion/trunk/subversion/svn/blame-cmd.c
subversion/trunk/subversion/svn/info-cmd.c
subversion/trunk/subversion/svn/mergeinfo-cmd.c
subversion/trunk/subversion/svn/propget-cmd.c
subversion/trunk/subversion/svn/status.c
subversion/trunk/subversion/svnadmin/main.c
subversion/trunk/subversion/svndumpfilter/main.c
subversion/trunk/subversion/svnlook/main.c
subversion/trunk/subversion/svnrdump/dump_editor.c
subversion/trunk/subversion/svnrdump/svnrdump.c
subversion/trunk/subversion/svnsync/main.c
subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
subversion/trunk/subversion/tests/libsvn_subr/auth-test.c
Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Fri Dec 10 18:18:42 2010
@@ -1024,8 +1024,8 @@ svn_client__harvest_committables(apr_has
* has no entry (e.g. locally deleted), issue a proper tree-
* conflicts error instead of a "not under version control". */
const svn_wc_conflict_description2_t *conflict;
- svn_wc__get_tree_conflict(&conflict, wc_ctx, target_abspath,
- iterpool, iterpool);
+ SVN_ERR(svn_wc__get_tree_conflict(&conflict, wc_ctx, target_abspath,
+ iterpool, iterpool));
if (conflict != NULL)
return svn_error_createf(
SVN_ERR_WC_FOUND_CONFLICT, NULL,
Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Fri Dec 10 18:18:42 2010
@@ -2106,7 +2106,7 @@ svn_client_relocate(const char *path,
apr_pool_t *pool)
{
if (! recurse)
- svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, 0,
- _("Non-recursive relocation not supported"));
+ SVN_ERR(svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("Non-recursive relocation not supported")));
return svn_client_relocate2(path, from_prefix, to_prefix, TRUE, ctx, pool);
}
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Fri Dec 10 18:18:42 2010
@@ -4456,7 +4456,7 @@ populate_remaining_ranges(apr_array_head
/* If this is a reverse merge reorder CHILD->REMAINING_RANGES
so it will work with the svn_rangelist_* APIs below. */
if (revision1 > revision2)
- svn_rangelist_reverse(child->remaining_ranges, iterpool);
+ SVN_ERR(svn_rangelist_reverse(child->remaining_ranges, iterpool));
for (j = 0; j < child->remaining_ranges->nelts; j++)
{
@@ -4498,7 +4498,7 @@ populate_remaining_ranges(apr_array_head
}
if (revision1 > revision2) /* Reverse merge */
- svn_rangelist_reverse(child->remaining_ranges, iterpool);
+ SVN_ERR(svn_rangelist_reverse(child->remaining_ranges, iterpool));
}
}
Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Fri Dec 10 18:18:42 2010
@@ -1060,7 +1060,8 @@ close_directory(void *dir_baton,
return SVN_NO_ERROR;
if (eb->dry_run)
- svn_hash__clear(svn_client__dry_run_deletions(eb->diff_cmd_baton), pool);
+ SVN_ERR(svn_hash__clear(svn_client__dry_run_deletions(eb->diff_cmd_baton),
+ pool));
err = get_dir_abspath(&local_dir_abspath, eb->wc_ctx, b->wcpath,
FALSE, b->pool);
Modified: subversion/trunk/subversion/libsvn_fs_base/reps-strings.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/reps-strings.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/reps-strings.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/reps-strings.c Fri Dec 10 18:18:42 2010
@@ -906,10 +906,12 @@ txn_body_read_rep(void *baton, trail_t *
{
representation_t *rep;
- svn_checksum_final(&args->rb->md5_checksum,
- args->rb->md5_checksum_ctx, trail->pool);
- svn_checksum_final(&args->rb->sha1_checksum,
- args->rb->sha1_checksum_ctx, trail->pool);
+ SVN_ERR(svn_checksum_final(&args->rb->md5_checksum,
+ args->rb->md5_checksum_ctx,
+ trail->pool));
+ SVN_ERR(svn_checksum_final(&args->rb->sha1_checksum,
+ args->rb->sha1_checksum_ctx,
+ trail->pool));
args->rb->checksum_finalized = TRUE;
SVN_ERR(svn_fs_bdb__read_rep(&rep, args->rb->fs,
Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/tree.c Fri Dec 10 18:18:42 2010
@@ -5365,9 +5365,10 @@ crawl_directory_for_mergeinfo(svn_fs_t *
void *val;
svn_pool_clear(iterpool);
apr_hash_this(hi, &key, NULL, &val);
- crawl_directory_for_mergeinfo(fs, val,
- svn_fspath__join(node_path, key, iterpool),
- result_catalog, iterpool);
+ SVN_ERR(crawl_directory_for_mergeinfo(fs, val,
+ svn_fspath__join(node_path, key,
+ iterpool),
+ result_catalog, iterpool));
}
svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c Fri Dec 10 18:18:42 2010
@@ -1071,14 +1071,14 @@ svn_fs_base__unparse_representation_skel
/* SHA1 */
if ((format >= SVN_FS_BASE__MIN_REP_SHARING_FORMAT) && rep->sha1_checksum)
- prepend_checksum(header_skel, rep->sha1_checksum, pool);
+ SVN_ERR(prepend_checksum(header_skel, rep->sha1_checksum, pool));
/* MD5 */
{
svn_checksum_t *md5_checksum = rep->md5_checksum;
if (! md5_checksum)
md5_checksum = svn_checksum_create(svn_checksum_md5, pool);
- prepend_checksum(header_skel, md5_checksum, pool);
+ SVN_ERR(prepend_checksum(header_skel, md5_checksum, pool));
}
/* TXN */
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Fri Dec 10 18:18:42 2010
@@ -3491,7 +3491,8 @@ rep_read_contents(void *baton,
svn_checksum_t *md5_checksum;
rb->checksum_finalized = TRUE;
- svn_checksum_final(&md5_checksum, rb->md5_checksum_ctx, rb->pool);
+ SVN_ERR(svn_checksum_final(&md5_checksum, rb->md5_checksum_ctx,
+ rb->pool));
if (!svn_checksum_match(md5_checksum, rb->md5_checksum))
return svn_error_createf
(SVN_ERR_FS_CORRUPT, NULL,
@@ -5652,7 +5653,7 @@ write_hash_rep(svn_filesize_t *size,
SVN_ERR(svn_hash_write2(hash, stream, SVN_HASH_TERMINATOR, pool));
/* Store the results. */
- svn_checksum_final(checksum, whb->checksum_ctx, pool);
+ SVN_ERR(svn_checksum_final(checksum, whb->checksum_ctx, pool));
*size = whb->size;
return svn_stream_printf(whb->stream, pool, "ENDREP\n");
@@ -7595,8 +7596,8 @@ pack_shard(const char *revs_dir,
SVN_ERR(svn_io_stat(&finfo, path, APR_FINFO_SIZE, iterpool));
/* Update the manifest. */
- svn_stream_printf(manifest_stream, iterpool, "%" APR_OFF_T_FMT "\n",
- next_offset);
+ SVN_ERR(svn_stream_printf(manifest_stream, iterpool, "%" APR_OFF_T_FMT
+ "\n", next_offset));
next_offset += finfo.size;
/* Copy all the bits from the rev file to the end of the pack file. */
Modified: subversion/trunk/subversion/libsvn_ra/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/compat.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/compat.c (original)
+++ subversion/trunk/subversion/libsvn_ra/compat.c Fri Dec 10 18:18:42 2010
@@ -763,12 +763,12 @@ svn_ra__file_revs_from_log(svn_ra_sessio
currpool = lastpool;
lastpool = tmppool;
- svn_stream_close(last_stream);
+ SVN_ERR(svn_stream_close(last_stream));
last_stream = stream;
last_props = props;
}
- svn_stream_close(last_stream);
+ SVN_ERR(svn_stream_close(last_stream));
svn_pool_destroy(currpool);
svn_pool_destroy(lastpool);
Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Fri Dec 10 18:18:42 2010
@@ -525,9 +525,9 @@ get_version_url(const char **checked_in_
propfind_url = session->repos_url.path;
}
- svn_ra_serf__deliver_props(&propfind_ctx, props, session, conn,
- propfind_url, base_revision, "0",
- checked_in_props, FALSE, NULL, pool);
+ SVN_ERR(svn_ra_serf__deliver_props(&propfind_ctx, props, session, conn,
+ propfind_url, base_revision, "0",
+ checked_in_props, FALSE, NULL, pool));
SVN_ERR(svn_ra_serf__wait_for_props(propfind_ctx, session, pool));
@@ -2401,9 +2401,9 @@ svn_ra_serf__change_rev_prop(svn_ra_sess
props = apr_hash_make(pool);
propfind_ctx = NULL;
- svn_ra_serf__deliver_props(&propfind_ctx, props, commit->session,
- commit->conn, vcc_url, rev, "0",
- checked_in_props, FALSE, NULL, pool);
+ SVN_ERR(svn_ra_serf__deliver_props(&propfind_ctx, props, commit->session,
+ commit->conn, vcc_url, rev, "0",
+ checked_in_props, FALSE, NULL, pool));
SVN_ERR(svn_ra_serf__wait_for_props(propfind_ctx, commit->session, pool));
Modified: subversion/trunk/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/options.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/options.c Fri Dec 10 18:18:42 2010
@@ -494,8 +494,9 @@ svn_ra_serf__exchange_capabilities(svn_r
svn_error_t *err;
/* This routine automatically fills in serf_sess->capabilities */
- svn_ra_serf__create_options_req(&opt_ctx, serf_sess, serf_sess->conns[0],
- serf_sess->repos_url.path, pool);
+ SVN_ERR(svn_ra_serf__create_options_req(&opt_ctx, serf_sess,
+ serf_sess->conns[0],
+ serf_sess->repos_url.path, pool));
err = svn_ra_serf__context_run_wait(
svn_ra_serf__get_options_done_ptr(opt_ctx), serf_sess, pool);
Modified: subversion/trunk/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/property.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/property.c Fri Dec 10 18:18:42 2010
@@ -990,8 +990,9 @@ svn_ra_serf__get_baseline_info(const cha
{
svn_ra_serf__options_context_t *opt_ctx;
- svn_ra_serf__create_options_req(&opt_ctx, session, conn,
- session->repos_url.path, pool);
+ SVN_ERR(svn_ra_serf__create_options_req(&opt_ctx, session, conn,
+ session->repos_url.path,
+ pool));
SVN_ERR(svn_ra_serf__context_run_wait(
svn_ra_serf__get_options_done_ptr(opt_ctx), session, pool));
Modified: subversion/trunk/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/serf.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/serf.c Fri Dec 10 18:18:42 2010
@@ -600,9 +600,10 @@ fetch_path_props(svn_ra_serf__propfind_c
*/
if (!SVN_IS_VALID_REVNUM(revision))
{
- svn_ra_serf__deliver_props(&prop_ctx, props, session, session->conns[0],
- path, revision, "0", desired_props, TRUE,
- NULL, session->pool);
+ SVN_ERR(svn_ra_serf__deliver_props(&prop_ctx, props, session,
+ session->conns[0], path, revision,
+ "0", desired_props, TRUE, NULL,
+ session->pool));
}
else
{
@@ -619,10 +620,10 @@ fetch_path_props(svn_ra_serf__propfind_c
prop_ctx = NULL;
path = svn_path_url_add_component2(basecoll_url, relative_url, pool);
revision = SVN_INVALID_REVNUM;
- svn_ra_serf__deliver_props(&prop_ctx, props, session, session->conns[0],
- path, revision, "0",
- desired_props, TRUE,
- NULL, session->pool);
+ SVN_ERR(svn_ra_serf__deliver_props(&prop_ctx, props, session,
+ session->conns[0], path, revision,
+ "0", desired_props, TRUE, NULL,
+ session->pool));
}
if (prop_ctx)
Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Fri Dec 10 18:18:42 2010
@@ -1189,10 +1189,11 @@ fetch_file(report_context_t *ctx, report
info->propfind = NULL;
if (info->fetch_props)
{
- svn_ra_serf__deliver_props(&info->propfind, info->props,
- ctx->sess, conn,
- info->url, info->target_rev, "0", all_props,
- FALSE, &ctx->done_propfinds, info->dir->pool);
+ SVN_ERR(svn_ra_serf__deliver_props(&info->propfind, info->props,
+ ctx->sess, conn, info->url,
+ info->target_rev, "0", all_props,
+ FALSE, &ctx->done_propfinds,
+ info->dir->pool));
SVN_ERR_ASSERT(info->propfind);
@@ -1743,12 +1744,14 @@ end_report(svn_ra_serf__xml_parser_t *pa
/* Unconditionally set fetch_props now. */
info->dir->fetch_props = TRUE;
- svn_ra_serf__deliver_props(&info->dir->propfind, info->dir->props,
- ctx->sess,
- ctx->sess->conns[ctx->sess->cur_conn],
- info->dir->url, info->dir->target_rev,
- "0", all_props, FALSE,
- &ctx->done_propfinds, info->dir->pool);
+ SVN_ERR(svn_ra_serf__deliver_props(&info->dir->propfind,
+ info->dir->props, ctx->sess,
+ ctx->sess->conns[ctx->sess->cur_conn],
+ info->dir->url,
+ info->dir->target_rev, "0",
+ all_props, FALSE,
+ &ctx->done_propfinds,
+ info->dir->pool));
SVN_ERR_ASSERT(info->dir->propfind);
Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Fri Dec 10 18:18:42 2010
@@ -1063,7 +1063,7 @@ static svn_error_t *ra_svn_get_file(svn_
svn_checksum_t *checksum;
const char *hex_digest;
- svn_checksum_final(&checksum, checksum_ctx, pool);
+ SVN_ERR(svn_checksum_final(&checksum, checksum_ctx, pool));
hex_digest = svn_checksum_to_cstring_display(checksum, pool);
if (strcmp(hex_digest, expected_checksum) != 0)
return svn_error_createf
Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Fri Dec 10 18:18:42 2010
@@ -480,8 +480,8 @@ dump_node(struct edit_baton *eb,
oldhash = apr_hash_make(pool);
propstring = svn_stringbuf_create_ensure(0, pool);
propstream = svn_stream_from_stringbuf(propstring, pool);
- svn_hash_write_incremental(prophash, oldhash, propstream, "PROPS-END",
- pool);
+ SVN_ERR(svn_hash_write_incremental(prophash, oldhash, propstream,
+ "PROPS-END", pool));
SVN_ERR(svn_stream_close(propstream));
proplen = propstring->len;
content_length += proplen;
@@ -907,7 +907,7 @@ write_revision_record(svn_stream_t *stre
encoded_prophash = svn_stringbuf_create_ensure(0, pool);
propstream = svn_stream_from_stringbuf(encoded_prophash, pool);
- svn_hash_write2(props, propstream, "PROPS-END", pool);
+ SVN_ERR(svn_hash_write2(props, propstream, "PROPS-END", pool));
SVN_ERR(svn_stream_close(propstream));
/* ### someday write a revision-content-checksum */
Modified: subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c Fri Dec 10 18:18:42 2010
@@ -279,8 +279,9 @@ renumber_mergeinfo_revs(svn_string_t **f
/** vtable for doing commits to a fs **/
-static struct node_baton *
-make_node_baton(apr_hash_t *headers,
+static svn_error_t *
+make_node_baton(struct node_baton **node_baton_p,
+ apr_hash_t *headers,
struct revision_baton *rb,
apr_pool_t *pool)
{
@@ -344,26 +345,29 @@ make_node_baton(apr_hash_t *headers,
if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM,
APR_HASH_KEY_STRING)))
{
- svn_checksum_parse_hex(&nb->result_checksum, svn_checksum_md5, val, pool);
+ SVN_ERR(svn_checksum_parse_hex(&nb->result_checksum, svn_checksum_md5,
+ val, pool));
}
if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM,
APR_HASH_KEY_STRING)))
{
- svn_checksum_parse_hex(&nb->base_checksum, svn_checksum_md5, val, pool);
+ SVN_ERR(svn_checksum_parse_hex(&nb->base_checksum, svn_checksum_md5, val,
+ pool));
}
if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM,
APR_HASH_KEY_STRING)))
{
- svn_checksum_parse_hex(&nb->copy_source_checksum, svn_checksum_md5, val,
- pool);
+ SVN_ERR(svn_checksum_parse_hex(&nb->copy_source_checksum,
+ svn_checksum_md5, val, pool));
}
/* What's cool about this dump format is that the parser just
ignores any unrecognized headers. :-) */
- return nb;
+ *node_baton_p = nb;
+ return SVN_NO_ERROR;
}
static struct revision_baton *
@@ -539,7 +543,7 @@ new_node_record(void **node_baton,
_("Malformed dumpstream: "
"Revision 0 must not contain node records"));
- nb = make_node_baton(headers, rb, pool);
+ SVN_ERR(make_node_baton(&nb, headers, rb, pool));
/* Make sure we have an action we recognize. */
if (nb->action < svn_node_action_change
Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Fri Dec 10 18:18:42 2010
@@ -668,7 +668,7 @@ parse_revision_line(const char **input,
absolute path key. */
existing_rangelist = apr_hash_get(hash, pathname->data, APR_HASH_KEY_STRING);
if (existing_rangelist)
- svn_rangelist_merge(&rangelist, existing_rangelist, pool);
+ SVN_ERR(svn_rangelist_merge(&rangelist, existing_rangelist, pool));
apr_hash_set(hash, pathname->data, APR_HASH_KEY_STRING, rangelist);
@@ -1188,9 +1188,9 @@ mergeinfo_hash_diff_cb(const void *key,
apr_array_header_t *deleted_rangelist, *added_rangelist;
from_rangelist = apr_hash_get(cb->from, path, APR_HASH_KEY_STRING);
to_rangelist = apr_hash_get(cb->to, path, APR_HASH_KEY_STRING);
- svn_rangelist_diff(&deleted_rangelist, &added_rangelist,
- from_rangelist, to_rangelist,
- cb->consider_inheritance, cb->pool);
+ SVN_ERR(svn_rangelist_diff(&deleted_rangelist, &added_rangelist,
+ from_rangelist, to_rangelist,
+ cb->consider_inheritance, cb->pool));
if (cb->deleted && deleted_rangelist->nelts > 0)
apr_hash_set(cb->deleted, apr_pstrdup(cb->pool, path),
APR_HASH_KEY_STRING, deleted_rangelist);
Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Fri Dec 10 18:18:42 2010
@@ -510,7 +510,7 @@ svn_wc_process_committed_queue2(svn_wc_c
iterpool));
}
- svn_hash__clear(queue->queue, iterpool);
+ SVN_ERR(svn_hash__clear(queue->queue, iterpool));
svn_pool_destroy(iterpool);
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Fri Dec 10 18:18:42 2010
@@ -3366,8 +3366,8 @@ svn_wc_relocate3(const char *path,
svn_wc_context_t *wc_ctx;
if (! recurse)
- svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, 0,
- _("Non-recursive relocation not supported"));
+ SVN_ERR(svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("Non-recursive relocation not supported")));
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL /* config */,
Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Fri Dec 10 18:18:42 2010
@@ -836,7 +836,7 @@ maybe_generate_propconflict(svn_boolean_
(mergestream, diff, the_val, working_val, new_val,
NULL, NULL, NULL, NULL,
svn_diff_conflict_display_modified_latest, filepool));
- svn_stream_close(mergestream);
+ SVN_ERR(svn_stream_close(mergestream));
}
}
Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Fri Dec 10 18:18:42 2010
@@ -2305,7 +2305,7 @@ svn_wc_get_status_editor5(const svn_delt
{
apr_array_header_t *ignores;
- svn_wc_get_default_ignores(&ignores, NULL, result_pool);
+ SVN_ERR(svn_wc_get_default_ignores(&ignores, NULL, result_pool));
eb->ignores = ignores;
}
@@ -2375,7 +2375,7 @@ svn_wc_walk_status(svn_wc_context_t *wc_
{
apr_array_header_t *ignores;
- svn_wc_get_default_ignores(&ignores, NULL, scratch_pool);
+ SVN_ERR(svn_wc_get_default_ignores(&ignores, NULL, scratch_pool));
ignore_patterns = ignores;
}
Modified: subversion/trunk/subversion/svn/blame-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/blame-cmd.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/blame-cmd.c (original)
+++ subversion/trunk/subversion/svn/blame-cmd.c Fri Dec 10 18:18:42 2010
@@ -203,11 +203,11 @@ blame_receiver(void *baton,
we may need to adjust this. */
if (merged_revision < revision)
{
- svn_stream_printf(out, pool, "G ");
+ SVN_ERR(svn_stream_printf(out, pool, "G "));
use_merged = TRUE;
}
else
- svn_stream_printf(out, pool, " ");
+ SVN_ERR(svn_stream_printf(out, pool, " "));
}
if (use_merged)
Modified: subversion/trunk/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/info-cmd.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/info-cmd.c (original)
+++ subversion/trunk/subversion/svn/info-cmd.c Fri Dec 10 18:18:42 2010
@@ -462,25 +462,19 @@ print_info(void *baton,
svn_cl__node_description(info->tree_conflict->src_right_version,
info->repos_root_URL, pool);
- svn_cmdline_printf(pool,
- "%s: %s\n",
- _("Tree conflict"),
- desc);
+ SVN_ERR(svn_cmdline_printf(pool, "%s: %s\n", _("Tree conflict"), desc));
if (src_left_version)
- svn_cmdline_printf(pool,
- " %s: %s\n",
- _("Source left"), /* (1) */
- src_left_version);
+ SVN_ERR(svn_cmdline_printf(pool, " %s: %s\n",
+ _("Source left"), /* (1) */
+ src_left_version));
/* (1): Sneaking in a space in "Source left" so that it is the
* same length as "Source right" while it still starts in the same
* column. That's just a tiny tweak in the English `svn'. */
if (src_right_version)
- svn_cmdline_printf(pool,
- " %s: %s\n",
- _("Source right"),
- src_right_version);
+ SVN_ERR(svn_cmdline_printf(pool, " %s: %s\n", _("Source right"),
+ src_right_version));
}
/* Print extra newline separator. */
Modified: subversion/trunk/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/mergeinfo-cmd.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/trunk/subversion/svn/mergeinfo-cmd.c Fri Dec 10 18:18:42 2010
@@ -48,9 +48,9 @@ print_log_rev(void *baton,
apr_pool_t *pool)
{
if (log_entry->non_inheritable)
- svn_cmdline_printf(pool, "r%ld*\n", log_entry->revision);
+ SVN_ERR(svn_cmdline_printf(pool, "r%ld*\n", log_entry->revision));
else
- svn_cmdline_printf(pool, "r%ld\n", log_entry->revision);
+ SVN_ERR(svn_cmdline_printf(pool, "r%ld\n", log_entry->revision));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propget-cmd.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/propget-cmd.c (original)
+++ subversion/trunk/subversion/svn/propget-cmd.c Fri Dec 10 18:18:42 2010
@@ -155,7 +155,7 @@ print_properties(svn_stream_t *out,
apr_hash_t *hash = apr_hash_make(iterpool);
apr_hash_set(hash, pname_utf8, APR_HASH_KEY_STRING, propval);
- svn_cl__print_prop_hash(out, hash, FALSE, iterpool);
+ SVN_ERR(svn_cl__print_prop_hash(out, hash, FALSE, iterpool));
}
else
{
Modified: subversion/trunk/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status.c (original)
+++ subversion/trunk/subversion/svn/status.c Fri Dec 10 18:18:42 2010
@@ -167,8 +167,10 @@ print_status(const char *path,
old_tree_conflict = svn_wc__cd2_to_cd(tree_conflict, pool);
tree_status_code = 'C';
- svn_cl__get_human_readable_tree_conflict_description(
- &desc, old_tree_conflict, pool);
+ SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
+ &desc,
+ old_tree_conflict,
+ pool));
tree_desc_line = apr_psprintf(pool, "\n > %s", desc);
(*tree_conflicts)++;
}
Modified: subversion/trunk/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/main.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/main.c (original)
+++ subversion/trunk/subversion/svnadmin/main.c Fri Dec 10 18:18:42 2010
@@ -1594,7 +1594,7 @@ main(int argc, const char *argv[])
if (argc <= 1)
{
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1621,7 +1621,7 @@ main(int argc, const char *argv[])
break;
else if (apr_err)
{
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1734,7 +1734,7 @@ main(int argc, const char *argv[])
break;
default:
{
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1768,7 +1768,7 @@ main(int argc, const char *argv[])
{
svn_error_clear(svn_cmdline_fprintf(stderr, pool,
_("subcommand argument required\n")));
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1786,7 +1786,7 @@ main(int argc, const char *argv[])
svn_error_clear(svn_cmdline_fprintf(stderr, pool,
_("Unknown command: '%s'\n"),
first_arg_utf8));
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1837,7 +1837,7 @@ main(int argc, const char *argv[])
pool);
svn_opt_format_option(&optstr, badopt, FALSE, pool);
if (subcommand->name[0] == '-')
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
else
svn_error_clear(svn_cmdline_fprintf(stderr, pool
, _("Subcommand '%s' doesn't accept option '%s'\n"
Modified: subversion/trunk/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/main.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svndumpfilter/main.c (original)
+++ subversion/trunk/subversion/svndumpfilter/main.c Fri Dec 10 18:18:42 2010
@@ -1294,7 +1294,7 @@ main(int argc, const char *argv[])
if (argc <= 1)
{
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1320,7 +1320,7 @@ main(int argc, const char *argv[])
break;
else if (apr_err)
{
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1359,7 +1359,7 @@ main(int argc, const char *argv[])
break;
default:
{
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1394,7 +1394,7 @@ main(int argc, const char *argv[])
svn_error_clear(svn_cmdline_fprintf
(stderr, pool,
_("Subcommand argument required\n")));
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1414,7 +1414,7 @@ main(int argc, const char *argv[])
svn_error_clear(svn_cmdline_fprintf(stderr, pool,
_("Unknown command: '%s'\n"),
first_arg_utf8));
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1496,7 +1496,7 @@ main(int argc, const char *argv[])
pool);
svn_opt_format_option(&optstr, badopt, FALSE, pool);
if (subcommand->name[0] == '-')
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
else
svn_error_clear(svn_cmdline_fprintf
(stderr, pool,
Modified: subversion/trunk/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/main.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/main.c (original)
+++ subversion/trunk/subversion/svnlook/main.c Fri Dec 10 18:18:42 2010
@@ -2261,7 +2261,7 @@ main(int argc, const char *argv[])
if (argc <= 1)
{
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -2286,7 +2286,7 @@ main(int argc, const char *argv[])
break;
else if (apr_err)
{
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -2386,7 +2386,7 @@ main(int argc, const char *argv[])
break;
default:
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
@@ -2428,7 +2428,7 @@ main(int argc, const char *argv[])
svn_error_clear
(svn_cmdline_fprintf(stderr, pool,
_("Subcommand argument required\n")));
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -2448,7 +2448,7 @@ main(int argc, const char *argv[])
(svn_cmdline_fprintf(stderr, pool,
_("Unknown command: '%s'\n"),
first_arg_utf8));
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -2480,7 +2480,7 @@ main(int argc, const char *argv[])
svn_error_clear
(svn_cmdline_fprintf(stderr, pool,
_("Repository argument required\n")));
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -2535,7 +2535,7 @@ main(int argc, const char *argv[])
pool);
svn_opt_format_option(&optstr, badopt, FALSE, pool);
if (subcommand->name[0] == '-')
- subcommand_help(NULL, NULL, pool);
+ SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
else
svn_error_clear
(svn_cmdline_fprintf
Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Fri Dec 10 18:18:42 2010
@@ -207,8 +207,8 @@ dump_props(struct dump_edit_baton *eb,
SVN_ERR(svn_stream_printf(eb->stream, pool, "\n\n"));
/* Cleanup so that data is never dumped twice. */
- svn_hash__clear(eb->props, eb->pool);
- svn_hash__clear(eb->deleted_props, eb->pool);
+ SVN_ERR(svn_hash__clear(eb->props, eb->pool));
+ SVN_ERR(svn_hash__clear(eb->deleted_props, eb->pool));
if (trigger_var)
*trigger_var = FALSE;
}
@@ -525,7 +525,7 @@ close_directory(void *dir_baton,
FALSE, NULL, SVN_INVALID_REVNUM, pool));
}
- svn_hash__clear(db->deleted_entries, pool);
+ SVN_ERR(svn_hash__clear(db->deleted_entries, pool));
return SVN_NO_ERROR;
}
@@ -725,7 +725,7 @@ apply_textdelta(void *file_baton, const
eb->dump_text = TRUE;
eb->base_checksum = apr_pstrdup(eb->pool, base_checksum);
- svn_stream_close(delta_filestream);
+ SVN_ERR(svn_stream_close(delta_filestream));
/* The actual writing takes place when this function has
finished. Set handler and handler_baton now so for
@@ -806,8 +806,8 @@ close_file(void *file_baton,
/* Cleanup */
eb->dump_props = FALSE;
- svn_hash__clear(eb->props, eb->pool);
- svn_hash__clear(eb->deleted_props, eb->pool);
+ SVN_ERR(svn_hash__clear(eb->props, eb->pool));
+ SVN_ERR(svn_hash__clear(eb->deleted_props, eb->pool));
}
/* Dump the text */
Modified: subversion/trunk/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/svnrdump.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Fri Dec 10 18:18:42 2010
@@ -180,7 +180,7 @@ replay_revstart(svn_revnum_t revision,
svn_stream_t *stdout_stream;
svn_stream_t *revprop_stream;
- svn_stream_for_stdout(&stdout_stream, pool);
+ SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
/* Revision-number: 19 */
SVN_ERR(svn_stream_printf(stdout_stream, pool,
@@ -230,7 +230,8 @@ replay_revend(svn_revnum_t revision,
/* No resources left to free. */
struct replay_baton *rb = replay_baton;
if (! rb->quiet)
- svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n", revision);
+ SVN_ERR(svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n",
+ revision));
return SVN_NO_ERROR;
}
@@ -371,8 +372,8 @@ replay_revisions(svn_ra_session_t *sessi
/* Revision 0 has no tree changes, so we're done. */
if (! quiet)
- svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n",
- start_revision);
+ SVN_ERR(svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n",
+ start_revision));
start_revision++;
/* If our first revision is 0, we can treat this as an
@@ -411,8 +412,8 @@ replay_revisions(svn_ra_session_t *sessi
/* All finished with START_REVISION! */
if (! quiet)
- svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n",
- start_revision);
+ SVN_ERR(svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n",
+ start_revision));
start_revision++;
/* Now go pick up additional revisions in the range, if any. */
@@ -448,7 +449,7 @@ load_revisions(svn_ra_session_t *session
SVN_ERR(drive_dumpstream_loader(stdin_stream, parser, parse_baton,
session, check_cancel, NULL, pool));
- svn_stream_close(stdin_stream);
+ SVN_ERR(svn_stream_close(stdin_stream));
return SVN_NO_ERROR;
}
@@ -827,7 +828,7 @@ main(int argc, const char **argv)
subcommand, pool);
svn_opt_format_option(&optstr, badopt, FALSE, pool);
if (subcommand->name[0] == '-')
- help_cmd(NULL, NULL, pool);
+ SVN_INT_ERR(help_cmd(NULL, NULL, pool));
else
svn_error_clear
(svn_cmdline_fprintf
Modified: subversion/trunk/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/main.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/main.c (original)
+++ subversion/trunk/subversion/svnsync/main.c Fri Dec 10 18:18:42 2010
@@ -1829,7 +1829,7 @@ main(int argc, const char *argv[])
if (argc <= 1)
{
- help_cmd(NULL, NULL, pool);
+ SVN_INT_ERR(help_cmd(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1850,7 +1850,7 @@ main(int argc, const char *argv[])
break;
else if (apr_err)
{
- help_cmd(NULL, NULL, pool);
+ SVN_INT_ERR(help_cmd(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -1970,7 +1970,7 @@ main(int argc, const char *argv[])
default:
{
- help_cmd(NULL, NULL, pool);
+ SVN_INT_ERR(help_cmd(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -2041,7 +2041,7 @@ main(int argc, const char *argv[])
}
else
{
- help_cmd(NULL, NULL, pool);
+ SVN_INT_ERR(help_cmd(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -2053,7 +2053,7 @@ main(int argc, const char *argv[])
first_arg);
if (subcommand == NULL)
{
- help_cmd(NULL, NULL, pool);
+ SVN_INT_ERR(help_cmd(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
@@ -2076,7 +2076,7 @@ main(int argc, const char *argv[])
svn_opt_format_option(&optstr, badopt, FALSE, pool);
if (subcommand->name[0] == '-')
{
- help_cmd(NULL, NULL, pool);
+ SVN_INT_ERR(help_cmd(NULL, NULL, pool));
}
else
{
Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs/fs-test.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Fri Dec 10 18:18:42 2010
@@ -4253,7 +4253,8 @@ verify_checksum(const svn_test_opts_t *o
against our idea of its checksum. They should be the same. */
str = svn_stringbuf_create("My text editor charges me rent.", pool);
- svn_checksum(&expected_checksum, svn_checksum_md5, str->data, str->len, pool);
+ SVN_ERR(svn_checksum(&expected_checksum, svn_checksum_md5, str->data,
+ str->len, pool));
SVN_ERR(svn_test__create_fs(&fs, "test-repo-verify-checksum",
opts, pool));
Modified: subversion/trunk/subversion/tests/libsvn_subr/auth-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/auth-test.c?rev=1044467&r1=1044466&r2=1044467&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/auth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/auth-test.c Fri Dec 10 18:18:42 2010
@@ -34,7 +34,8 @@ test_platform_specific_auth_providers(ap
int number_of_providers = 0;
/* Test non-available auth provider */
- svn_auth_get_platform_specific_provider(&provider, "fake", "fake", pool);
+ SVN_ERR(svn_auth_get_platform_specific_provider(&provider, "fake", "fake",
+ pool));
if (provider)
return svn_error_createf
@@ -44,7 +45,8 @@ test_platform_specific_auth_providers(ap
/* Make sure you get appropriate number of providers when retrieving
all auth providers */
- svn_auth_get_platform_specific_client_providers(&providers, NULL, pool);
+ SVN_ERR(svn_auth_get_platform_specific_client_providers(&providers, NULL,
+ pool));
#ifdef SVN_HAVE_GNOME_KEYRING
number_of_providers += 2;
Re: Missing SVN_ERR() wraps
Posted by Johan Corveleyn <jc...@gmail.com>.
On Mon, Dec 13, 2010 at 5:21 PM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> danielsh@apache.org wrote on Fri, Dec 10, 2010 at 18:18:43 -0000:
>> Author: danielsh
>> Date: Fri Dec 10 18:18:42 2010
>> New Revision: 1044467
>>
>> URL: http://svn.apache.org/viewvc?rev=1044467&view=rev
>> Log:
>> Fix error leaks.
>>
>> * everywhere:
>> Add missing SVN_ERR() calls.
>
> Johan, there are a few missing SVN_ERR() on the -bytes branch too ---
> e.g., none(!) of the calls to increment_pointers() check the return
> value. Please fix :)
Doh! Will fix soonish ...
Thanks for taking a look.
Cheers,
--
Johan
Missing SVN_ERR() wraps
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
danielsh@apache.org wrote on Fri, Dec 10, 2010 at 18:18:43 -0000:
> Author: danielsh
> Date: Fri Dec 10 18:18:42 2010
> New Revision: 1044467
>
> URL: http://svn.apache.org/viewvc?rev=1044467&view=rev
> Log:
> Fix error leaks.
>
> * everywhere:
> Add missing SVN_ERR() calls.
Johan, there are a few missing SVN_ERR() on the -bytes branch too ---
e.g., none(!) of the calls to increment_pointers() check the return
value. Please fix :)
@all, let me repeat that I would be happy if we had a way to have
a tool warn us of these omissions. Right now, my only idea is to add
a warn_unused_result decoration on every single function declaration
in our code. And while we could do that, I hoped there would be an
easier way.
Daniel