aboutsummaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/profile.c b/profile.c
index 28bb442a..fe411e43 100644
--- a/profile.c
+++ b/profile.c
@@ -66,7 +66,10 @@ void
set_prof_file(const char *file)
{
assert(file != NULL);
- prof_fp = fopen(file, "w");
+ if (strcmp(file, "-") == 0)
+ prof_fp = stdout;
+ else
+ prof_fp = fopen(file, "w");
if (prof_fp == NULL) {
warning(_("could not open `%s' for writing: %s"),
file, strerror(errno));