From 9d2e7f97454cd759c4c70a554c918caccc0b34a9 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 17 Dec 1996 21:31:35 +0000 Subject: Clean up some extra trailing LFs. svn path=/trunk/; revision=652 --- pop2.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pop2.c') diff --git a/pop2.c b/pop2.c index c2e5ecc4..0ca40e04 100644 --- a/pop2.c +++ b/pop2.c @@ -24,6 +24,10 @@ int pop2_ok (FILE *sockfp, char *argbuf) pound_arg = equal_arg = -1; if (fgets(buf, sizeof(buf), sockfp)) { + if (buf[strlen(buf)-1] == '\n') + buf[strlen(buf)-1] = '\0'; + if (buf[strlen(buf)-1] == '\r') + buf[strlen(buf)-1] = '\r'; if (outlevel == O_VERBOSE) error(0, 0, "POP2< %s", buf); -- cgit v1.2.3