summaryrefslogtreecommitdiff
path: root/file_io/unix/filedup.c
diff options
context:
space:
mode:
Diffstat (limited to 'file_io/unix/filedup.c')
-rw-r--r--file_io/unix/filedup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/file_io/unix/filedup.c b/file_io/unix/filedup.c
index 797f8045f..c68d2e970 100644
--- a/file_io/unix/filedup.c
+++ b/file_io/unix/filedup.c
@@ -20,6 +20,8 @@
#include "apr_thread_mutex.h"
#include "apr_arch_inherit.h"
+#include <assert.h>
+
static apr_status_t file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p,
int which_dup)
@@ -29,6 +31,8 @@ static apr_status_t file_dup(apr_file_t **new_file,
int flags = 0;
#endif
+ assert(which_dup == 1 || which_dup == 2);
+
if (which_dup == 2) {
if ((*new_file) == NULL) {
/* We can't dup2 unless we have a valid new_file */