From: Thiago Galesi <thiagogalesi@gmail.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: lp: too large subtraction on unsigned?
Date: Sun, 1 Mar 2009 20:41:38 -0300 [thread overview]
Message-ID: <82ecf08e0903011541y32f74656uc33dc08a2c2a5fa0@mail.gmail.com> (raw)
In-Reply-To: <49AB12A7.10708@gmail.com>
Doesn't look like something is wrong, or I'm missing something...
:
> do {
> if (canwrite > 0) {
> ...
> count -= written;
> }
If there are chars left you write to the PP and take it out of the total
> if (lf && canwrite <= 0) {
> ...
> count--;
> ...
> }
> } while (count > 0 && (CONSOLE_LP_STRICT || written > 0));
The second if is for translating \n to \r\n only if you've already
written everything (up to /n) to the PP
If count > 0 fails (that is, count == 0) you get out of the loop
--
-
Thiago Galesi
prev parent reply other threads:[~2009-03-01 23:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-01 22:56 Roel Kluin
2009-03-01 23:41 ` Thiago Galesi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82ecf08e0903011541y32f74656uc33dc08a2c2a5fa0@mail.gmail.com \
--to=thiagogalesi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®