Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 May 2001 00:00:13 -0400 (EDT)
From:      Mike Heffner <mheffner@vt.edu>
To:        Warner Losh <imp@harmony.village.org>
Cc:        FreeBSD-audit <FreeBSD-audit@FreeBSD.ORG>
Subject:   Re: Small patch to allow mail to read Eudora mailboxes
Message-ID:  <XFMail.20010501000013.mheffner@vt.edu>
In-Reply-To: <200105010350.f413oOR56065@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format
--_=XFMail.1.4.7.FreeBSD:20010501000013:439=_
Content-Type: text/plain; charset=us-ascii


On 01-May-2001 Warner Losh wrote:
| 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.

Because I was syncing with OpenBSD, but yes it can be done this way instead.


Mike

-- 
  Mike Heffner       <mheffner@vt.edu>
  Blacksburg, VA   <mikeh@FreeBSD.org>
  http://filebox.vt.edu/users/mheffner


--_=XFMail.1.4.7.FreeBSD:20010501000013:439=_
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE67jTNFokZQs3sv5kRAsyYAJ9uG55oGUJYIr7+P0Bw8iJj4FeaKwCgl5wO
wY6dfbCyZxZyZnbq9DbImqQ=
=1FXk
-----END PGP SIGNATURE-----

--_=XFMail.1.4.7.FreeBSD:20010501000013:439=_--
End of MIME message

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?XFMail.20010501000013.mheffner>