diff mbox series

[2/2] trace-cmd: Make tracecmd_unpair_peer() return void

Message ID 20200413205521.400302580@goodmis.org (mailing list archive)
State Accepted
Commit 090911dafec421ec8d6dbbd626c9b2997d4fbd69
Headers show
Series trace-cmd: Minor updates to tracecmd_unpair_peer() function | expand

Commit Message

Steven Rostedt April 13, 2020, 8:53 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The return value of tracecmd_unpair_peer() is useless. Just make it a void
function call.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 include/trace-cmd/trace-cmd.h | 2 +-
 lib/trace-cmd/trace-input.c   | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
index 76fcffaea235..f3c95f3087a2 100644
--- a/include/trace-cmd/trace-cmd.h
+++ b/include/trace-cmd/trace-cmd.h
@@ -147,7 +147,7 @@  struct tracecmd_input *tracecmd_open_head(const char *file);
 struct tracecmd_input *tracecmd_open_fd(int fd);
 int tracecmd_pair_peer(struct tracecmd_input *handle,
 		       struct tracecmd_input *peer);
-int tracecmd_unpair_peer(struct tracecmd_input *handle);
+void tracecmd_unpair_peer(struct tracecmd_input *handle);
 void tracecmd_ref(struct tracecmd_input *handle);
 void tracecmd_close(struct tracecmd_input *handle);
 int tracecmd_read_headers(struct tracecmd_input *handle);
diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c
index 50d52f49a8f0..55c3d80a6057 100644
--- a/lib/trace-cmd/trace-input.c
+++ b/lib/trace-cmd/trace-input.c
@@ -3245,18 +3245,16 @@  fail:
  *
  * This removes any peer that is linked to the  @handle.
  */
-int tracecmd_unpair_peer(struct tracecmd_input *handle)
+void tracecmd_unpair_peer(struct tracecmd_input *handle)
 {
 	if (!handle)
-		return -1;
+		return;
 
 	if (handle->host.peer_data) {
 		tracecmd_close(handle->host.peer_data);
 		handle->host.peer_data = NULL;
 		tsync_check_enable(handle);
 	}
-
-	return 0;
 }
 
 /**