Project

General

Profile

Actions

Bug #701

closed
DB

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

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

Added by David Binderman over 12 years ago. Updated over 12 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.

DG Updated by David Goulet over 12 years ago Actions #1

Good catch thanks!

I'll push a patch today and backport it accordingly.

DG Updated by David Goulet over 12 years ago Actions #2

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

DG Updated by David Goulet over 12 years ago Actions #3

  • Target version changed from 15 to 2.5
Actions

Also available in: PDF Atom