diff mbox series

[02/11] libtracefs: Fix example in the dynamic events man page to compile

Message ID 20211122234956.788401-3-rostedt@goodmis.org (mailing list archive)
State Accepted
Commit 13fd3f59c1961caee612ee172b68afd9b841ae06
Headers show
Series libtracefs: Have all man page examples be executable | expand

Commit Message

Steven Rostedt Nov. 22, 2021, 11:49 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The example in the dynamic events man page fails to compile because it
references an "err" variable without declaring it. Declare it so that the
example will compile.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Documentation/libtracefs-dynevents.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Documentation/libtracefs-dynevents.txt b/Documentation/libtracefs-dynevents.txt
index 25172c3..503bd7e 100644
--- a/Documentation/libtracefs-dynevents.txt
+++ b/Documentation/libtracefs-dynevents.txt
@@ -182,7 +182,7 @@  int main (int argc, char **argv, char **env)
 	}
 
 	if (tracefs_dynevent_create(kprobe) || tracefs_dynevent_create(kretprobe)){
-		err = tracefs_error_last(NULL);
+		char *err = tracefs_error_last(NULL);
 		perror("Failed to create kprobes:");
 		if (err && strlen(err))
 			fprintf(stderr, "%s\n", err);