From d7c1e582173855d201f316b636f19639906d2f24 Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Mon, 15 Sep 2008 13:06:40 +0000
Subject: [PATCH] - Get rid of some ugly #defines

--HG--
extra : convert_revision : 4cfa02494ded17cdb068ec66581b720a5a0fd70b
---
 svr-chansession.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/svr-chansession.c b/svr-chansession.c
index 7cedb8e3..364daf06 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -640,6 +640,9 @@ static int noptycommand(struct Channel *channel, struct ChanSess *chansess) {
 	pid_t pid;
 	unsigned int i;
 
+	const int FDIN = 0;
+	const int FDOUT = 1;
+
 	TRACE(("enter noptycommand"))
 
 	/* redirect stdin/stdout/stderr */
@@ -669,8 +672,7 @@ static int noptycommand(struct Channel *channel, struct ChanSess *chansess) {
 		}
 
 		/* redirect stdin/stdout */
-#define FDIN 0
-#define FDOUT 1
+
 		if ((dup2(infds[FDIN], STDIN_FILENO) < 0) ||
 			(dup2(outfds[FDOUT], STDOUT_FILENO) < 0) ||
 			(dup2(errfds[FDOUT], STDERR_FILENO) < 0)) {
-- 
GitLab