Project

General

Profile

Actions

Bug #701

closed

ust-app.c: 2 * bad if test ?

Added by David Binderman over 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
Start date:
12/03/2013
Due date:
% Done:

100%

Estimated time:

Description

I just ran the static analyser cppcheck over the
source code of lttng-tools-2.3.0. It said

1.

ust-app.c:3047:5: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]

Source code is

if (ret != -LTTNG_UST_ERR_EXITING || ret != -EPIPE) {

Suggest swap || for &&

2.

ust-app.c:3147:5: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]

if (ret != -LTTNG_UST_ERR_EXITING || ret != -EPIPE) {

Duplicate.

Actions

Also available in: Atom PDF