From 637555684620efeb8579c367b7379346f0a46d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 21 Jun 2017 22:19:28 +0200 Subject: [PATCH] Use defines instead of numeric values for standard file descriptors --- abduco.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/abduco.c b/abduco.c index 3c60a36..0ac2774 100644 --- a/abduco.c +++ b/abduco.c @@ -446,9 +446,9 @@ static bool create_session(const char *name, char * const argv[]) { #ifdef NDEBUG int fd = open("/dev/null", O_RDWR); if (fd != -1) { - dup2(fd, 0); - dup2(fd, 1); - dup2(fd, 2); + dup2(fd, STDIN_FILENO); + dup2(fd, STDOUT_FILENO); + dup2(fd, STDERR_FILENO); close(fd); } #endif /* NDEBUG */