aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/Carpet/src/TimerSet.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/Carpet/Carpet/src/TimerSet.cc b/Carpet/Carpet/src/TimerSet.cc
index 0420a8262..ca9dc8077 100644
--- a/Carpet/Carpet/src/TimerSet.cc
+++ b/Carpet/Carpet/src/TimerSet.cc
@@ -124,7 +124,8 @@ namespace Carpet {
return -1;
}
close (1);
- dup (fdfile); // dup to 1, i.e., stdout again
+ int const fd = dup (fdfile); // dup to 1, i.e., stdout again
+ assert (fd == 1);
close (fdfile);
return oldfd;
#endif
@@ -139,7 +140,8 @@ namespace Carpet {
#ifdef HAVE_UNISTD_H
fflush (stdout);
close (1);
- dup (oldfd);
+ int const fd = dup (oldfd);
+ assert (fd == 1);
close (oldfd);
#endif
}