diff mbox series

libtracefs: Fix example in the dynamic events man page to compile

Message ID 20211111151616.020fcf43@gandalf.local.home (mailing list archive)
State Superseded
Headers show
Series libtracefs: Fix example in the dynamic events man page to compile | expand

Commit Message

Steven Rostedt Nov. 11, 2021, 8:16 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 95032ef..8e75f6f 100644
--- a/Documentation/libtracefs-dynevents.txt
+++ b/Documentation/libtracefs-dynevents.txt
@@ -184,7 +184,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);