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

next in thread | previous in thread | raw e-mail | index | archive | help
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.

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?200105010350.f413oOR56065>