[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1430975 - /subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c

From: Ben Reser <ben_at_reser.org>
Date: Wed, 9 Jan 2013 10:35:22 -0800

On Wed, Jan 9, 2013 at 10:00 AM, Branko Čibej <brane_at_wandisco.com> wrote:
> On 09.01.2013 18:54, stefan2_at_apache.org wrote:
>>
>> - if (header->is_delta)
>> + if (header->is_delta == FALSE)
>
> Can we please use logical operators to test boolean values, not
> arithmetic ones?
>
> if (!header->is_delta)

There's quite a few examples of this in the code right now that we
should fix then

[[[
subversion/svn/svn.c: if (descend == FALSE)
subversion/libsvn_subr/win32_crashrpt.c: if (log_params == FALSE &&
sym_info->Flags & SYMFLAG_LOCAL)
subversion/libsvn_subr/win32_crashrpt.c: if
(get_temp_filename(dmp_filename, LOGFILE_PREFIX, "dmp") == FALSE ||
subversion/libsvn_subr/win32_crashrpt.c:
get_temp_filename(log_filename, LOGFILE_PREFIX, "log") == FALSE)
subversion/libsvn_subr/win32_crashrpt.c: if (load_dbghelp_dll() == FALSE)
subversion/libsvn_subr/deprecated.c: if (have_options == FALSE)
subversion/libsvn_subr/subst.c: if (keyword_matches == FALSE)
subversion/libsvn_subr/subst.c: if (keyword_matches == FALSE ||
subversion/libsvn_subr/cmdline.c: if (non_interactive == FALSE)
subversion/libsvn_subr/cmdline.c: if (non_interactive == FALSE)
subversion/libsvn_subr/cmdline.c: if (non_interactive == FALSE)
subversion/libsvn_subr/opt.c: if (have_options == FALSE)
subversion/libsvn_ra_svn/client.c: if (v == FALSE)
subversion/libsvn_repos/authz.c:
section_name) == FALSE
subversion/libsvn_repos/authz.c:
section_name) == FALSE)
subversion/libsvn_repos/fs-wrap.c: if
(svn_utf__is_valid(value->data, value->len) == FALSE)
subversion/libsvn_repos/authz.c~:
section_name) == FALSE
subversion/libsvn_repos/authz.c~:
section_name) == FALSE)
subversion/libsvn_fs_fs/fs_fs.c~: ((may_be_corrupt == FALSE ||
(checksum) != NULL) \
subversion/libsvn_fs_fs/fs_fs.c~: if (ra->is_delta == FALSE)
subversion/libsvn_fs_fs/fs_fs.c~: if (rep_args->is_delta == FALSE)
subversion/libsvn_fs_fs/fs_fs.c: ((may_be_corrupt == FALSE ||
(checksum) != NULL) \
subversion/libsvn_fs_fs/fs_fs.c: if (ra->is_delta == FALSE)
subversion/libsvn_fs_fs/fs_fs.c: if (rep_args->is_delta == FALSE)
subversion/libsvn_fs_base/fs.c: if (files_match == FALSE)
subversion/svnsync/svnsync.c: if (!filter || filter(propname) == FALSE)
subversion/libsvn_ra_serf/property.c: if (requested_allprop == FALSE)
subversion/libsvn_ra_serf/property.c: if (requested_allprop == FALSE)
subversion/libsvn_ra_serf/locks.c: if (ctx->read_headers == FALSE)
subversion/libsvn_ra_serf/util.c: if (sl.code == 404 &&
ctx->ignore_errors == FALSE)
subversion/libsvn_ra_serf/update.c: if
(fetch_ctx->aborted_read == FALSE && fetch_ctx->read_size)
subversion/libsvn_ra_serf/update.c: if (fetch_ctx->read_headers == FALSE)
subversion/libsvn_ra_serf/update.c: if (info->lock_token &&
info->fetch_props == FALSE)
subversion/libsvn_ra_serf/update.c: if (report->closed_root ==
FALSE && report->root_dir != NULL)
subversion/tests/libsvn_subr/subst_translate-test.c:
SVN_TEST_ASSERT(translated_line_endings == FALSE);
subversion/tests/libsvn_subr/stream-test.c: SVN_TEST_ASSERT(read_only
== FALSE);
subversion/tests/libsvn_subr/stream-test.c: SVN_TEST_ASSERT(read_only
== FALSE);
subversion/tests/libsvn_wc/db-test.c: SVN_TEST_ASSERT(had_props == FALSE);
subversion/tests/libsvn_wc/db-test.c: SVN_TEST_ASSERT(had_props == FALSE);
subversion/tests/libsvn_wc/db-test.c: SVN_TEST_ASSERT(props_mod == FALSE);
subversion/tests/libsvn_wc/db-test.c: SVN_TEST_ASSERT(conflicted == FALSE);
subversion/libsvn_delta/svndiff.c: if (eb->header_done == FALSE)
subversion/libsvn_delta/svndiff.c: if (eb->header_done == FALSE)
tools/client-side/svn-bench/svn-bench.c: if (descend == FALSE)
tools/client-side/svn-bench/main.c~: if (descend == FALSE)
]]]

[[[
subversion/libsvn_ra_svn/client.c: if (v == TRUE)
subversion/tests/libsvn_subr/subst_translate-test.c:
SVN_TEST_ASSERT(translated_to_utf8 == TRUE);
subversion/tests/libsvn_subr/string-test.c: if
(svn_stringbuf_compare(a, b) == TRUE)
subversion/tests/libsvn_wc/db-test.c: SVN_TEST_ASSERT(have_base == TRUE);
subversion/tests/libsvn_wc/db-test.c: SVN_TEST_ASSERT(have_work == TRUE);
]]]
Received on 2013-01-09 20:02:43 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.