Skip to contentSkip to conversation

trace-record: wrong refferencing

PATCH Applied Jiri Olsa 2 participants 2 messages Feb 25, 2010

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

PATCH 1/1 trace-record: wrong refferencing

hi,

looks like bug this time :)

wbr,
jirka

trace-record.c +1 -1
index cdfc857..2a754b9 100644
@@ -116,7 +116,7 @@ struct tracecmd_recorder *tracecmd_create_recorder(const char *file, int cpu)
 	int fd;
 
 	fd = open(file, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 0644);
-	if (recorder->fd < 0)
+	if (fd < 0)
 		return NULL;
 
 	recorder = tracecmd_create_recorder_fd(fd, cpu);
#1 lore raw
Quoted 3 lines · Jiri Olsa

hi,

looks like bug this time :)

Indeed it is.

Applied, thanks!

-- Steve

Quoted 19 lines

wbr,
jirka

trace-record.c +1 -1
index cdfc857..2a754b9 100644
@@ -116,7 +116,7 @@ struct tracecmd_recorder *tracecmd_create_recorder(const char *file, int cpu)
 	int fd;
 
 	fd = open(file, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 0644);
-	if (recorder->fd < 0)
+	if (fd < 0)
 		return NULL;
 
 	recorder = tracecmd_create_recorder_fd(fd, cpu);