summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-03 01:29:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-03 01:29:55 +0000
commit474cdaab2d77146d683f124ee0d6318470a16d29 (patch)
treecd2ff647a5543347e6cb7f87442de6748b020e4b /libexec
parent35abb7fbadb135fcd5b36458c3ebfad5dc43e385 (diff)
\r and \n must be distinguished in some cases (telnet); netbsd pr#2969;
darcy@druid.com
Diffstat (limited to 'libexec')
-rw-r--r--libexec/uucpd/uucpd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c
index 237eeb14c18..69f68841125 100644
--- a/libexec/uucpd/uucpd.c
+++ b/libexec/uucpd/uucpd.c
@@ -42,7 +42,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)uucpd.c 5.10 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: uucpd.c,v 1.5 1996/10/26 04:59:20 millert Exp $";
+static char rcsid[] = "$Id: uucpd.c,v 1.6 1996/12/03 01:29:54 deraadt Exp $";
#endif /* not lint */
/*
@@ -221,11 +221,12 @@ register int n;
if (read(0, &c, 1) <= 0)
return(-1);
c &= 0177;
- if (c == '\n' || c == '\r') {
+ if (c == '\r') {
*p = '\0';
return(0);
}
- *p++ = c;
+ if (c != '\n')
+ *p++ = c;
}
return(-1);
}