projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: ctf-text: don't close stdout
[babeltrace.git]
/
formats
/
ctf-text
/
ctf-text.c
diff --git
a/formats/ctf-text/ctf-text.c
b/formats/ctf-text/ctf-text.c
index e9fd74180dcd9594d7a5a07b35ef6207c67e7ebb..b87718b58ddecabeaa66f7f6de0cfc3bc3701404 100644
(file)
--- a/
formats/ctf-text/ctf-text.c
+++ b/
formats/ctf-text/ctf-text.c
@@
-597,10
+597,12
@@
int ctf_text_close_trace(struct bt_trace_descriptor *td)
int ret;
struct ctf_text_stream_pos *pos =
container_of(td, struct ctf_text_stream_pos, trace_descriptor);
int ret;
struct ctf_text_stream_pos *pos =
container_of(td, struct ctf_text_stream_pos, trace_descriptor);
- ret = fclose(pos->fp);
- if (ret) {
- perror("Error on fclose");
- return -1;
+ if (pos->fp != stdout) {
+ ret = fclose(pos->fp);
+ if (ret) {
+ perror("Error on fclose");
+ return -1;
+ }
}
g_free(pos);
return 0;
}
g_free(pos);
return 0;
This page took
0.022693 seconds
and
4
git commands to generate.