Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2001 21:52:06 -0600
From:      Warner Losh <imp@harmony.village.org>
Cc:        Mike Heffner <mheffner@vt.edu>, FreeBSD-audit <FreeBSD-audit@FreeBSD.ORG>
Subject:   Re: Small patch to allow mail to read Eudora mailboxes 
Message-ID:  <200105010352.f413q6R56095@harmony.village.org>
In-Reply-To: Your message of "Mon, 30 Apr 2001 21:50:24 MDT." <200105010350.f413oOR56065@harmony.village.org> 
References:  <200105010350.f413oOR56065@harmony.village.org>  <XFMail.20010430234442.mheffner@vt.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200105010350.f413oOR56065@harmony.village.org> Warner Losh writes:
: In message <XFMail.20010430234442.mheffner@vt.edu> Mike Heffner writes:
: : +               if (count >= 2 && linebuf[count-1] == '\n' &&
: : +                   linebuf[count - 2] == '\r')
: : +                       linebuf[count - 2] = linebuf[--count];
: 
: Why not just
: 
: 	if (count >= 2 && linebuf[count-1] == '\n' &&
: 	    linebuf[count - 2] == '\r') {
: 		count--;
: 		linebuf[count - 1] = '\n';
: 	}
: 
: which is clearer and you avoid a hard to understand (and maybe ill
: defined) side effect with the --count part of the statement.

Also, make that 'count - 1' rather than 'count-1'

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105010352.f413q6R56095>