Standardize `strcmp(a, b) == 0` instead of `!strcmp(a, b)`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 10 Jul 2019 21:33:41 +0000 (17:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Jul 2019 15:53:35 +0000 (11:53 -0400)
commitacfa811244c6c27fedf0e2ebfb283ab42cc7e25e
treefe2891a3bd277301bb0c33592f5cdca60455e31c
parentbe1b2e7ebb6f56bf47bf918dd6ebc161f73d358b
Standardize `strcmp(a, b) == 0` instead of `!strcmp(a, b)`

`!strcmp(a, b)` always looks like a negation to me (not equal), while
the `== 0` version clearly shows that we're after equality.

Semantic patch:

    @@
    expression a;
    expression b;
    @@

    - !strcmp(a, b)
    + strcmp(a, b) == 0

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I8e05b544c5cbd733e3d3e5b2c3554ee98669d1d5
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1685
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
12 files changed:
src/cli/babeltrace2-cfg-cli-args.c
src/cli/babeltrace2-cfg-cli-params-arg.c
src/cli/babeltrace2.c
src/ctf-writer/attributes.c
src/lib/graph/component.c
src/lib/trace-ir/attributes.c
src/plugins/ctf/common/metadata/visitor-generate-ir.c
src/plugins/ctf/fs-src/fs.c
src/plugins/ctf/lttng-live/viewer-connection.c
src/plugins/text/pretty/pretty.c
tests/ctf-writer/ctf_writer.c
tests/lib/test_bt_values.c
This page took 0.02989 seconds and 4 git commands to generate.