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 2013/01/09 20:24:53 UTC
svn commit: r1431017 - in /subversion/trunk: subversion/libsvn_delta/
subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/
subversion/libsvn_ra_serf/ subversion/libsvn_ra_svn/
subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/svn/
subversion/s...
Author: stefan2
Date: Wed Jan 9 19:24:52 2013
New Revision: 1431017
URL: http://svn.apache.org/viewvc?rev=1431017&view=rev
Log:
Coding style patch: in logical expressions, instead of comparing
with logical constants use arithmetic operations. I.e. replace
<expr> == TRUE with <expr> and
<expr> == FALSE with !<expr>
* subversion/libsvn_delta/svndiff.c
(send_simple_insertion_window,
window_handler): change condition style
* subversion/libsvn_fs_base/fs.c
(svn_fs_base__clean_logs): ditto
* subversion/libsvn_fs_fs/fs_fs.c
(representation_string,
create_rep_state_body,
build_rep_list): ditto
* subversion/libsvn_ra_serf/locks.c
(handle_lock): ditto
* subversion/libsvn_ra_serf/property.c
(create_propfind_body): same here,
* subversion/libsvn_ra_serf/update.c
(cancel_fetch,
handle_fetch,
end_report,
finish_report): here,
* subversion/libsvn_ra_serf/util.c
(svn_ra_serf__handle_xml_parser): here,
* subversion/libsvn_ra_svn/client.c
(optbool_to_tristate): here,
* subversion/libsvn_repos/authz.c
(authz_parse_section): and here.
* subversion/libsvn_repos/fs-wrap.c
(svn_repos__validate_prop): here as well
* subversion/libsvn_subr/cmdline.c
(svn_cmdline_create_auth_baton): and here
* subversion/libsvn_subr/deprecated.c
(print_command_info): here
* subversion/libsvn_subr/opt.c
(print_command_info2): more of the same
* subversion/libsvn_subr/subst.c
(translate_chunk): ditto
* subversion/libsvn_subr/win32_crashrpt.c
(write_var_values,
svn__unhandled_exception_filter): ditto
* subversion/svn/svn.c
(sub_main): ditto
* subversion/svnsync/svnsync.c
(filter_props): and more of the
* subversion/tests/libsvn_subr/stream-test.c
(test_readonly): same thing
* subversion/tests/libsvn_subr/string-test.c
(test21): ditto
* subversion/tests/libsvn_subr/subst_translate-test.c
(test_svn_subst_translate_string2_null_encode): here
* subversion/tests/libsvn_wc/db-test.c
(test_getting_info,
test_working_info): and here
* tools/client-side/svn-bench/svn-bench.c
(sub_main): and finally here
Modified:
subversion/trunk/subversion/libsvn_delta/svndiff.c
subversion/trunk/subversion/libsvn_fs_base/fs.c
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
subversion/trunk/subversion/libsvn_ra_serf/locks.c
subversion/trunk/subversion/libsvn_ra_serf/property.c
subversion/trunk/subversion/libsvn_ra_serf/update.c
subversion/trunk/subversion/libsvn_ra_serf/util.c
subversion/trunk/subversion/libsvn_ra_svn/client.c
subversion/trunk/subversion/libsvn_repos/authz.c
subversion/trunk/subversion/libsvn_repos/fs-wrap.c
subversion/trunk/subversion/libsvn_subr/cmdline.c
subversion/trunk/subversion/libsvn_subr/deprecated.c
subversion/trunk/subversion/libsvn_subr/opt.c
subversion/trunk/subversion/libsvn_subr/subst.c
subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c
subversion/trunk/subversion/svn/svn.c
subversion/trunk/subversion/svnsync/svnsync.c
subversion/trunk/subversion/tests/libsvn_subr/stream-test.c
subversion/trunk/subversion/tests/libsvn_subr/string-test.c
subversion/trunk/subversion/tests/libsvn_subr/subst_translate-test.c
subversion/trunk/subversion/tests/libsvn_wc/db-test.c
subversion/trunk/tools/client-side/svn-bench/svn-bench.c
Modified: subversion/trunk/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/svndiff.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/trunk/subversion/libsvn_delta/svndiff.c Wed Jan 9 19:24:52 2013
@@ -203,7 +203,7 @@ send_simple_insertion_window(svn_txdelta
assert(window->ops[0].offset == 0);
/* write stream header if necessary */
- if (eb->header_done == FALSE)
+ if (!eb->header_done)
{
eb->header_done = TRUE;
headers[0] = 'S';
@@ -269,7 +269,7 @@ window_handler(svn_txdelta_window_t *win
return svn_error_trace(send_simple_insertion_window(window, eb));
/* Make sure we write the header. */
- if (eb->header_done == FALSE)
+ if (!eb->header_done)
{
char svnver[4] = {'S','V','N','\0'};
len = 4;
Modified: subversion/trunk/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/fs.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/fs.c Wed Jan 9 19:24:52 2013
@@ -1016,7 +1016,7 @@ svn_fs_base__clean_logs(const char *live
sub_pool));
/* If log files do not match, go to the next log file. */
- if (files_match == FALSE)
+ if (!files_match)
continue;
}
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=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Jan 9 19:24:52 2013
@@ -2527,7 +2527,7 @@ representation_string(representation_t *
return "-1";
#define DISPLAY_MAYBE_NULL_CHECKSUM(checksum) \
- ((may_be_corrupt == FALSE || (checksum) != NULL) \
+ ((!may_be_corrupt || (checksum) != NULL) \
? svn_checksum_to_cstring_display((checksum), pool) \
: "(null)")
@@ -4431,7 +4431,7 @@ create_rep_state_body(struct rep_state *
*rep_state = rs;
*rep_args = ra;
- if (ra->is_delta == FALSE)
+ if (!ra->is_delta)
/* This is a plaintext, so just return the current rep_state. */
return SVN_NO_ERROR;
@@ -4784,7 +4784,7 @@ build_rep_list(apr_array_header_t **list
return SVN_NO_ERROR;
}
- if (rep_args->is_delta == FALSE)
+ if (!rep_args->is_delta)
{
/* This is a plaintext, so just return the current rep_state. */
*src_state = rs;
Modified: subversion/trunk/subversion/libsvn_ra_serf/locks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/locks.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/locks.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/locks.c Wed Jan 9 19:24:52 2013
@@ -261,7 +261,7 @@ handle_lock(serf_request_t *request,
request, response, ctx->handler, pool));
}
- if (ctx->read_headers == FALSE)
+ if (!ctx->read_headers)
{
serf_bucket_t *headers;
const char *val;
Modified: subversion/trunk/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/property.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/property.c Wed Jan 9 19:24:52 2013
@@ -526,7 +526,7 @@ create_propfind_body(serf_bucket_t **bkt
}
/* If we're not doing an allprop, add <prop> tags. */
- if (requested_allprop == FALSE)
+ if (!requested_allprop)
{
tmp = SERF_BUCKET_SIMPLE_STRING_LEN("<prop>",
sizeof("<prop>")-1,
@@ -540,7 +540,7 @@ create_propfind_body(serf_bucket_t **bkt
serf_bucket_aggregate_prepend(body_bkt, tmp);
- if (requested_allprop == FALSE)
+ if (!requested_allprop)
{
tmp = SERF_BUCKET_SIMPLE_STRING_LEN("</prop>",
sizeof("</prop>")-1,
Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Wed Jan 9 19:24:52 2013
@@ -935,7 +935,7 @@ cancel_fetch(serf_request_t *request,
*/
if (fetch_ctx->read_headers)
{
- if (fetch_ctx->aborted_read == FALSE && fetch_ctx->read_size)
+ if (!fetch_ctx->aborted_read && fetch_ctx->read_size)
{
fetch_ctx->aborted_read = TRUE;
fetch_ctx->aborted_read_size = fetch_ctx->read_size;
@@ -1089,7 +1089,7 @@ handle_fetch(serf_request_t *request,
/* ### new field. make sure we didn't miss some initialization. */
SVN_ERR_ASSERT(fetch_ctx->handler != NULL);
- if (fetch_ctx->read_headers == FALSE)
+ if (!fetch_ctx->read_headers)
{
serf_bucket_t *hdrs;
const char *val;
@@ -2252,7 +2252,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
info->lock_token = apr_hash_get(ctx->lock_path_tokens, info->name,
APR_HASH_KEY_STRING);
- if (info->lock_token && info->fetch_props == FALSE)
+ if (info->lock_token && !info->fetch_props)
info->fetch_props = TRUE;
/* If possible, we'd like to fetch only a delta against a
@@ -3066,7 +3066,7 @@ finish_report(void *report_baton,
{
/* Ensure that we opened and closed our root dir and that we closed
* all of our children. */
- if (report->closed_root == FALSE && report->root_dir != NULL)
+ if (!report->closed_root && report->root_dir != NULL)
{
SVN_ERR(close_all_dirs(report->root_dir));
}
Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Wed Jan 9 19:24:52 2013
@@ -1559,7 +1559,7 @@ svn_ra_serf__handle_xml_parser(serf_requ
}
/* Woo-hoo. Nothing here to see. */
- if (sl.code == 404 && ctx->ignore_errors == FALSE)
+ if (sl.code == 404 && !ctx->ignore_errors)
{
err = handle_server_error(request, response, pool);
Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Wed Jan 9 19:24:52 2013
@@ -1304,9 +1304,9 @@ static svn_error_t *ra_svn_get_dir(svn_r
static svn_tristate_t
optbool_to_tristate(apr_uint64_t v)
{
- if (v == TRUE)
+ if (v)
return svn_tristate_true;
- if (v == FALSE)
+ if (!v)
return svn_tristate_false;
return svn_tristate_unknown; /* Contains SVN_RA_SVN_UNSPECIFIED_NUMBER */
Modified: subversion/trunk/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/authz.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/authz.c (original)
+++ subversion/trunk/subversion/libsvn_repos/authz.c Wed Jan 9 19:24:52 2013
@@ -304,10 +304,8 @@ authz_parse_section(const char *section_
svn_boolean_t conclusive;
/* Does the section apply to us? */
- if (is_applicable_section(b->qualified_repos_path,
- section_name) == FALSE
- && is_applicable_section(b->repos_path,
- section_name) == FALSE)
+ if (!is_applicable_section(b->qualified_repos_path, section_name)
+ && !is_applicable_section(b->repos_path, section_name))
return TRUE;
/* Work out what this section grants. */
Modified: subversion/trunk/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/fs-wrap.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/trunk/subversion/libsvn_repos/fs-wrap.c Wed Jan 9 19:24:52 2013
@@ -178,7 +178,7 @@ svn_repos__validate_prop(const char *nam
* LF line endings. */
if (svn_prop_needs_translation(name))
{
- if (svn_utf__is_valid(value->data, value->len) == FALSE)
+ if (!svn_utf__is_valid(value->data, value->len))
{
return svn_error_createf
(SVN_ERR_BAD_PROPERTY_VALUE, NULL,
Modified: subversion/trunk/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cmdline.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cmdline.c Wed Jan 9 19:24:52 2013
@@ -485,7 +485,7 @@ svn_cmdline_create_auth_baton(svn_auth_b
pb->config_dir = config_dir;
}
- if (non_interactive == FALSE)
+ if (!non_interactive)
{
/* This provider doesn't prompt the user in order to get creds;
it prompts the user regarding the caching of creds. */
@@ -516,7 +516,7 @@ svn_cmdline_create_auth_baton(svn_auth_b
svn_auth_get_ssl_client_cert_file_provider(&provider, pool);
APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
- if (non_interactive == FALSE)
+ if (!non_interactive)
{
/* This provider doesn't prompt the user in order to get creds;
it prompts the user regarding the caching of creds. */
@@ -531,7 +531,7 @@ svn_cmdline_create_auth_baton(svn_auth_b
}
APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
- if (non_interactive == FALSE)
+ if (!non_interactive)
{
svn_boolean_t ssl_client_cert_file_prompt;
Modified: subversion/trunk/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/deprecated.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_subr/deprecated.c Wed Jan 9 19:24:52 2013
@@ -364,7 +364,7 @@ print_command_info(const svn_opt_subcomm
{
if (cmd->valid_options[i])
{
- if (have_options == FALSE)
+ if (!have_options)
{
SVN_ERR(svn_cmdline_fputs(_("\nValid options:\n"),
stream, pool));
Modified: subversion/trunk/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/opt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/opt.c Wed Jan 9 19:24:52 2013
@@ -296,7 +296,7 @@ print_command_info2(const svn_opt_subcom
{
if (cmd->valid_options[i])
{
- if (have_options == FALSE)
+ if (!have_options)
{
SVN_ERR(svn_cmdline_fputs(_("\nValid options:\n"),
stream, pool));
Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Wed Jan 9 19:24:52 2013
@@ -987,14 +987,14 @@ translate_chunk(svn_stream_t *dst,
b->keyword_buf[b->keyword_off++] = *p++;
keyword_matches = match_keyword(b->keyword_buf, b->keyword_off,
keyword_name, b->keywords);
- if (keyword_matches == FALSE)
+ if (!keyword_matches)
{
/* reuse the ending '$' */
p--;
b->keyword_off--;
}
- if (keyword_matches == FALSE ||
+ if (!keyword_matches ||
translate_keyword(b->keyword_buf, &b->keyword_off,
keyword_name, b->expand, b->keywords) ||
b->keyword_off >= SVN_KEYWORD_MAX_LEN)
Modified: subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c Wed Jan 9 19:24:52 2013
@@ -428,7 +428,7 @@ write_var_values(PSYMBOL_INFO sym_info,
(void *)var_data);
fprintf(log_file, "%s=%s", sym_info->Name, value_str);
}
- if (log_params == FALSE && sym_info->Flags & SYMFLAG_LOCAL)
+ if (!log_params && sym_info->Flags & SYMFLAG_LOCAL)
{
format_value(value_str, sym_info->ModBase, sym_info->TypeIndex,
(void *)var_data);
@@ -738,13 +738,13 @@ svn__unhandled_exception_filter(PEXCEPTI
return EXCEPTION_CONTINUE_SEARCH;
/* ... or if we can't create the log files ... */
- if (get_temp_filename(dmp_filename, LOGFILE_PREFIX, "dmp") == FALSE ||
- get_temp_filename(log_filename, LOGFILE_PREFIX, "log") == FALSE)
+ if (!get_temp_filename(dmp_filename, LOGFILE_PREFIX, "dmp") ||
+ !get_temp_filename(log_filename, LOGFILE_PREFIX, "log"))
return EXCEPTION_CONTINUE_SEARCH;
/* If we can't load a recent version of the dbghelp.dll, pass on this
exception */
- if (load_dbghelp_dll() == FALSE)
+ if (!load_dbghelp_dll())
return EXCEPTION_CONTINUE_SEARCH;
/* open log file */
Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Wed Jan 9 19:24:52 2013
@@ -2474,7 +2474,7 @@ sub_main(int argc, const char *argv[], a
}
/* -N has a different meaning depending on the command */
- if (descend == FALSE)
+ if (!descend)
{
if (subcommand->cmd_func == svn_cl__status)
{
Modified: subversion/trunk/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/svnsync.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/svnsync.c (original)
+++ subversion/trunk/subversion/svnsync/svnsync.c Wed Jan 9 19:24:52 2013
@@ -531,7 +531,7 @@ filter_props(int *filtered_count, apr_ha
/* Copy all properties:
- not matching the exclude pattern if provided OR
- matching the include pattern if provided */
- if (!filter || filter(propname) == FALSE)
+ if (!filter || !filter(propname))
{
apr_hash_set(filtered, propname, APR_HASH_KEY_STRING, propval);
}
Modified: subversion/trunk/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/stream-test.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/stream-test.c Wed Jan 9 19:24:52 2013
@@ -490,7 +490,7 @@ test_readonly(apr_pool_t *pool)
/* File should be writable */
SVN_ERR(svn_io_stat(&finfo, path, wanted, pool));
SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo, pool));
- SVN_TEST_ASSERT(read_only == FALSE);
+ SVN_TEST_ASSERT(!read_only);
/* Set read only */
SVN_ERR(svn_io_set_file_read_only(path, FALSE, pool));
@@ -506,7 +506,7 @@ test_readonly(apr_pool_t *pool)
/* File should be writable */
SVN_ERR(svn_io_stat(&finfo, path, wanted, pool));
SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo, pool));
- SVN_TEST_ASSERT(read_only == FALSE);
+ SVN_TEST_ASSERT(!read_only);
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/string-test.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/string-test.c Wed Jan 9 19:24:52 2013
@@ -479,7 +479,7 @@ test21(apr_pool_t *pool)
svn_stringbuf_strip_whitespace(a);
- if (svn_stringbuf_compare(a, b) == TRUE)
+ if (svn_stringbuf_compare(a, b))
return SVN_NO_ERROR;
else
return fail(pool, "test failed");
Modified: subversion/trunk/subversion/tests/libsvn_subr/subst_translate-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/subst_translate-test.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/subst_translate-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/subst_translate-test.c Wed Jan 9 19:24:52 2013
@@ -123,8 +123,8 @@ test_svn_subst_translate_string2_null_en
source_string, NULL, FALSE,
pool, pool));
SVN_TEST_STRING_ASSERT(new_value->data, "\xc3\x86");
- SVN_TEST_ASSERT(translated_to_utf8 == TRUE);
- SVN_TEST_ASSERT(translated_line_endings == FALSE);
+ SVN_TEST_ASSERT(translated_to_utf8);
+ SVN_TEST_ASSERT(!translated_line_endings);
}
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/db-test.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/db-test.c Wed Jan 9 19:24:52 2013
@@ -421,7 +421,7 @@ test_getting_info(apr_pool_t *pool)
SVN_TEST_ASSERT(checksum == NULL);
SVN_TEST_ASSERT(target == NULL);
SVN_TEST_ASSERT(lock == NULL);
- SVN_TEST_ASSERT(had_props == FALSE);
+ SVN_TEST_ASSERT(!had_props);
SVN_TEST_ASSERT(apr_hash_count(props) == 0);
/* SVN_TEST_ASSERT(update_root == ???); */
@@ -862,12 +862,12 @@ test_working_info(apr_pool_t *pool)
SVN_TEST_STRING_ASSERT(original_root_url, ROOT_TWO);
SVN_TEST_STRING_ASSERT(original_uuid, UUID_TWO);
SVN_TEST_ASSERT(original_revnum == 2);
- SVN_TEST_ASSERT(had_props == FALSE);
- SVN_TEST_ASSERT(props_mod == FALSE);
- SVN_TEST_ASSERT(have_base == TRUE);
+ SVN_TEST_ASSERT(!had_props);
+ SVN_TEST_ASSERT(!props_mod);
+ SVN_TEST_ASSERT(have_base);
/* SVN_TEST_ASSERT(have_more_work...); */
- SVN_TEST_ASSERT(have_work == TRUE);
- SVN_TEST_ASSERT(conflicted == FALSE);
+ SVN_TEST_ASSERT(have_work);
+ SVN_TEST_ASSERT(!conflicted);
SVN_TEST_ASSERT(lock == NULL);
/* SVN_TEST_ASSERT(last_mod_time...); */
/* SVN_TEST_ASSERT(op_root...); */
Modified: subversion/trunk/tools/client-side/svn-bench/svn-bench.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svn-bench/svn-bench.c?rev=1431017&r1=1431016&r2=1431017&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/svn-bench/svn-bench.c (original)
+++ subversion/trunk/tools/client-side/svn-bench/svn-bench.c Wed Jan 9 19:24:52 2013
@@ -798,7 +798,7 @@ sub_main(int argc, const char *argv[], a
}
/* -N has a different meaning depending on the command */
- if (descend == FALSE)
+ if (!descend)
opt_state.depth = svn_depth_files;
err = svn_config_get_config(&(ctx->config),
Re: svn commit: r1431017 - in /subversion/trunk: subversion/libsvn_delta/
subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_serf/
subversion/libsvn_ra_svn/ subversion/libsvn_repos/ subversion/libsvn_subr/
subversion/svn/ subversion/s...
Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Wed, Jan 9, 2013 at 8:36 PM, Julian Foad <ju...@btopenworld.com>wrote:
> Stefan,
>
> > Log:
>
> > Coding style patch: in logical expressions, instead of comparing
> > with logical constants use arithmetic operations. I.e. replace
>
> No don't use arithmetic operations. Maybe write, "In *boolean*
> expressions, instead of comparing with FALSE (or, worse, with TRUE), use
> *boolean* operators."
>
> The wording should be slightly better now.
>
> > Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
> >
> ==============================================================================
> > --- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
> > +++ subversion/trunk/subversion/libsvn_ra_svn/client.c Wed Jan 9
> 19:24:52 2013
> > @@ -1304,9 +1304,9 @@ static svn_error_t *ra_svn_get_dir(svn_r
> > static svn_tristate_t
> > optbool_to_tristate(apr_uint64_t v)
> > {
> > - if (v == TRUE)
> > + if (v)
>
> No, no, not here!
>
You beat me by 2 minutes ;)
> > return svn_tristate_true;
> > - if (v == FALSE)
> > + if (!v)
> > return svn_tristate_false;
> >
> > return svn_tristate_unknown; /* Contains
> SVN_RA_SVN_UNSPECIFIED_NUMBER */
>
> Everything else looks correct.
>
Thanks for the review!
-- Stefan^2.
--
Certified & Supported Apache Subversion Downloads:
*
http://www.wandisco.com/subversion/download
*
Re: svn commit: r1431017 - in /subversion/trunk: subversion/libsvn_delta/ subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_serf/ subversion/libsvn_ra_svn/ subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/svn/ subversion/s...
Posted by Julian Foad <ju...@btopenworld.com>.
Stefan,
> Log:
> Coding style patch: in logical expressions, instead of comparing
> with logical constants use arithmetic operations. I.e. replace
No don't use arithmetic operations. Maybe write, "In *boolean* expressions, instead of comparing with FALSE (or, worse, with TRUE), use *boolean* operators."
> Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_svn/client.c Wed Jan 9 19:24:52 2013
> @@ -1304,9 +1304,9 @@ static svn_error_t *ra_svn_get_dir(svn_r
> static svn_tristate_t
> optbool_to_tristate(apr_uint64_t v)
> {
> - if (v == TRUE)
> + if (v)
No, no, not here!
> return svn_tristate_true;
> - if (v == FALSE)
> + if (!v)
> return svn_tristate_false;
>
> return svn_tristate_unknown; /* Contains SVN_RA_SVN_UNSPECIFIED_NUMBER */
Everything else looks correct.
- Julian