Clean-up: tests: notification-client: unused assignment
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 21 Apr 2021 18:34:46 +0000 (14:34 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 21 Apr 2021 18:50:55 +0000 (14:50 -0400)
1452629 Unused value

An assigned value that is never used may represent unnecessary
computation, an incorrect algorithm, or possibly the need for cleanup or
refactoring.

In main: A value assigned to a variable is never used. (CWE-563)

CID 1452629 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value:
Assigning value -1 to ret here, but that stored value is overwritten
before it can be used

Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I0d80a244a7b2b3d6aed57d58ca5435230d664f99

tests/regression/tools/trigger/utils/notification-client.c

index 54248f6330cca7f3202d6b75f488148685123655..cd1f8ea70cf4906b944708c0c8e20a1a7c04e100 100644 (file)
@@ -240,7 +240,6 @@ int main(int argc, char **argv)
                        break;
                case LTTNG_NOTIFICATION_CHANNEL_STATUS_CLOSED:
                        printf("Notification channel was closed by peer.\n");
-                       ret = -1;
                        break;
                default:
                        fprintf(stderr, "A communication error occurred on the notification channel.\n");
This page took 0.025977 seconds and 4 git commands to generate.