From: Jason at zx2c4.com (Jason A. Donenfeld)
Subject: [PATCH] filter: refactor cgit_new_filter()
Date: Tue, 14 Jan 2014 21:54:21 +0100 [thread overview]
Message-ID: <CAHmME9rfDH6cHS8aiuhpN=pykynJNfb2MPHVAN8aoHE7cfq3jw@mail.gmail.com> (raw)
In-Reply-To: <20140114203939.GB7608@serenity.lan>
On Tue, Jan 14, 2014 at 9:39 PM, John Keeping <john at keeping.me.uk> wrote:
> I like the simplification, but I'm not sure the result is better. Even
> without the rest we should replace the strncmp with prefixcmp though.
Agreed.
>
> There's actually no reason we couldn't mutate "cmd" here, which would
> simplify it a lot, but I'm not sure we want to remove the const
> modifiers all the way through. Then we can just do "*colon = '\0'" and
> use strcmp.
IMHO, it's better to keep lookup tables like these in the read-only
section. Let's keep the constness.
next prev parent reply other threads:[~2014-01-14 20:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 13:00 Jason
2014-01-14 20:39 ` john
2014-01-14 20:54 ` Jason [this message]
2014-01-14 21:59 ` john
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='CAHmME9rfDH6cHS8aiuhpN=pykynJNfb2MPHVAN8aoHE7cfq3jw@mail.gmail.com' \
--to=cgit@lists.zx2c4.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;
as well as URLs for NNTP newsgroup(s).