Project

General

Profile

Actions

Bug #701

closed

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

Added by David Binderman about 11 years ago. Updated almost 11 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 #1

Updated by David Goulet about 11 years ago

Good catch thanks!

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

Actions #2

Updated by David Goulet about 11 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #3

Updated by David Goulet almost 11 years ago

  • Target version changed from 15 to 2.5
Actions

Also available in: Atom PDF