diff mbox series

trace-cmd: Make functions in trace-write-local.h inline

Message ID 20200305104838.29b8a427@gandalf.local.home (mailing list archive)
State Accepted
Commit 37533ffcfc6f25917314457b4b9f32f9e86c5966
Headers show
Series trace-cmd: Make functions in trace-write-local.h inline | expand

Commit Message

Steven Rostedt March 5, 2020, 3:48 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Functions defined in header files really should be marked as static inline
as header files are not to hold the actual code (where a inline is more like
a define, but with stronger typing).

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---

Tzvetomir,

Nothing wrong with your patch, but it made me notice that these functions
were never set as static inline.

-- Steve

 lib/trace-cmd/include/trace-write-local.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/trace-cmd/include/trace-write-local.h b/lib/trace-cmd/include/trace-write-local.h
index 94ad910b..046992f1 100644
--- a/lib/trace-cmd/include/trace-write-local.h
+++ b/lib/trace-cmd/include/trace-write-local.h
@@ -8,7 +8,7 @@ 
 
 /* Local for trace-input.c, trace-output.c and trace-msg.c */
 
-static ssize_t __do_write(int fd, const void *data, size_t size)
+static inline ssize_t __do_write(int fd, const void *data, size_t size)
 {
 	ssize_t tot = 0;
 	ssize_t w;
@@ -26,7 +26,7 @@  static ssize_t __do_write(int fd, const void *data, size_t size)
 	return tot;
 }
 
-static ssize_t
+static inline ssize_t
 __do_write_check(int fd, const void *data, size_t size)
 {
 	ssize_t ret;