Cleanup: relayd: identical code for different branches
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 1 Oct 2019 13:35:19 +0000 (09:35 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 3 Oct 2019 00:31:33 +0000 (20:31 -0400)
Coverity report:
  CID 1404928 (#1 of 1): Identical code for different branches
  (IDENTICAL_BRANCHES)identical_branches: The same code is executed when
  the condition ret < 0 is true or false, because the code in the if-then
  branch and after the if statement is identical. Should the if statement
  be removed?

Reported-by: Coverity (1404928) Identical code for different branches
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/stream.c

index 06e82b29198a082476c34b5d215cc3a083ad14bf..1b4e38ac8fc2b0c9d209b39ac3a559fe9e284f98 100644 (file)
@@ -1133,9 +1133,7 @@ int stream_complete_packet(struct relay_stream *stream, size_t packet_total_size
 
        stream->prev_data_seq = sequence_number;
        ret = try_rotate_stream_data(stream);
-       if (ret < 0) {
-               goto end;
-       }
+
 end:
        return ret;
 }
This page took 0.025724 seconds and 4 git commands to generate.