From: Stephen Kitt <steve@sk2.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: dash@vger.kernel.org
Subject: Re: [PATCH v2] jobs: Handle string-based job descriptors
Date: Tue, 7 Jun 2016 16:43:07 +0200 [thread overview]
Message-ID: <20160607164307.650db975@heffalump.sk2.org> (raw)
In-Reply-To: <20160606144527.GA23630@gondor.apana.org.au>
[-- Attachment #1: Type: text/plain, Size: 826 bytes --]
On Mon, 6 Jun 2016 22:45:27 +0800, Herbert Xu <herbert@gondor.apana.org.au>
wrote:
> On Fri, Jun 03, 2016 at 09:54:31AM +0200, Stephen Kitt wrote:
> > When looking for a job using a string descriptor, e.g.
> >
> > fg %man
> >
> > the relevant loop in src/jobs.c only ever exits to the err label. With
> > this patch, when the end condition is reached, we check whether a job
> > was found, and if so, set things up to exit correctly via gotit.
> > Multiple matches are already caught using the test in the match block.
> >
> > Signed-off-by: Stephen Kitt <steve@sk2.org>
>
> Thanks for the patch. I'd prefer to move that logic out of the
> loop, like this:
[...]
> - while (1) {
> - if (!jp)
> - goto err;
> + while (jp) {
[...]
That is indeed much better, thanks!
Regards,
Stephen
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-06-07 15:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 7:54 [PATCH] Handle string-based job descriptors Stephen Kitt
2016-06-06 14:45 ` [PATCH v2] jobs: " Herbert Xu
2016-06-07 14:43 ` Stephen Kitt [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=20160607164307.650db975@heffalump.sk2.org \
--to=steve@sk2.org \
--cc=dash@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
/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;
as well as URLs for NNTP newsgroup(s).