Skip to contentSkip to conversation

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

PATCH New Steven Rostedt 1 participant 1 message Nov 11, 2021 Documentation

lore
Share & tools
lore
#0 lore raw

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

From: "Steven Rostedt (VMware)" <[email protected]>

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.

---
 Documentation/libtracefs-dynevents.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/libtracefs-dynevents.txt +1 -1
index 95032ef..8e75f6f 100644
@@ -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);
Signature · 1 line
2.31.1