From owner-freebsd-audit Mon Apr 30 21: 1:49 2001 Delivered-To: freebsd-audit@freebsd.org Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.161.193]) by hub.freebsd.org (Postfix) with ESMTP id 1928937B423 for ; Mon, 30 Apr 2001 21:01:46 -0700 (PDT) (envelope-from mheffner@vt.edu) Received: from mail.vt.edu (gkar.cc.vt.edu [198.82.161.190]) by lennier.cc.vt.edu (8.11.0/8.11.0) with ESMTP id f4141ju257994; Tue, 1 May 2001 00:01:45 -0400 (EDT) Received: from enterprise.muriel.penguinpowered.com ([198.82.100.151]) by gkar.cc.vt.edu (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) with ESMTP id <0GCN00I141UWF8@gkar.cc.vt.edu>; Tue, 1 May 2001 00:01:44 -0400 (EDT) Date: Tue, 01 May 2001 00:00:13 -0400 (EDT) From: Mike Heffner Subject: Re: Small patch to allow mail to read Eudora mailboxes In-reply-to: <200105010350.f413oOR56065@harmony.village.org> To: Warner Losh Cc: FreeBSD-audit Message-id: MIME-version: 1.0 X-Mailer: XFMail 1.4.7 on FreeBSD Content-type: multipart/signed; boundary="_=XFMail.1.4.7.FreeBSD:20010501000013:439=_"; micalg=pgp-md5; protocol="application/pgp-signature" X-Priority: 3 (Normal) Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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 Blacksburg, VA 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