diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-12-17 21:31:35 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-12-17 21:31:35 +0000 |
commit | 9d2e7f97454cd759c4c70a554c918caccc0b34a9 (patch) | |
tree | 81771de668fa9055d848f9a02c813aaf6b47a847 /imap.c | |
parent | 33c898e6691726979bdf6e46b7f389e1ca13622d (diff) | |
download | fetchmail-9d2e7f97454cd759c4c70a554c918caccc0b34a9.tar.gz fetchmail-9d2e7f97454cd759c4c70a554c918caccc0b34a9.tar.bz2 fetchmail-9d2e7f97454cd759c4c70a554c918caccc0b34a9.zip |
Clean up some extra trailing LFs.
svn path=/trunk/; revision=652
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -27,6 +27,10 @@ int imap_ok (FILE *sockfp, char *argbuf) do { if (!fgets(buf, sizeof(buf), sockfp)) return(PS_SOCKET); + 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, "IMAP< %s", buf); @@ -122,6 +126,10 @@ static int imap_getsizes(FILE *sockfp, int count, int *sizes) { int num, size; + 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, "IMAP< %s", buf); if (strstr(buf, "OK")) |