[clang-tidy] Simplify boolean expressions

Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2019-11-25 16:51:28 -08:00
committed by ridiculousfish
parent 4087b2ee15
commit 7d1cc992e5
9 changed files with 9 additions and 19 deletions

View File

@@ -299,7 +299,7 @@ int builtin_functions(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
}
// Erase, desc, query, copy and list are mutually exclusive.
bool describe = opts.description ? true : false;
bool describe = opts.description != nullptr;
if (describe + opts.erase + opts.list + opts.query + opts.copy > 1) {
streams.err.append_format(BUILTIN_ERR_COMBO, cmd);
builtin_print_error_trailer(parser, streams.err, cmd);