All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] tools/proftool: add missing definition
Date: Mon, 01 Jul 2013 20:45:19 +0200	[thread overview]
Message-ID: <51D1CE3F.5000000@myspectrum.nl> (raw)
In-Reply-To: <1372590906-75089-3-git-send-email-andreas.devel@googlemail.com>

Hello Andreas,

On 06/30/2013 01:15 PM, Andreas Bie?mann wrote:
> BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a simple
> define for them.
>
> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
> ---
>   
> +#ifndef REG_NOERROR
> +/* BSD regex.h do not expose REG_NOERROR */
> +# define REG_NOERROR 0
> +#endif
> +
I think a neater solutions is to actually remove the REG_NOERROR.
 From man regexec, GNU 2011-09-27: "regexec() returns zero for a
successful match or REG_NOMATCH for failure.". Opengroup specs
will mention the same. REG_NOERROR is not mentioned at all.

e.g.:

         if (err) {
             regex_report_error(&item->regex, err, "match",
                        item->name);
             break;
         }

should do the job in a portable way (and reads a bit better,
as well). But this is only a cosmetic comment, the patch by
itself should do the job.

Regards,
Jeroen

p.s. Strictly speaking it is dead code actually...

  reply	other threads:[~2013-07-01 18:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-30 11:15 [U-Boot] [PATCH 0/3] Adopt u-boot build to OS X Andreas Bießmann
2013-06-30 11:15 ` [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on " Andreas Bießmann
2013-07-01 18:58   ` Lubomir Popov
2013-07-03 14:15   ` Simon Glass
2013-06-30 11:15 ` [U-Boot] [PATCH 2/3] tools/proftool: add missing definition Andreas Bießmann
2013-07-01 18:45   ` Jeroen Hofstee [this message]
2013-07-01 20:12     ` Jeroen Hofstee
2013-07-02  6:39       ` Andreas Bießmann
2013-07-01 18:59   ` Lubomir Popov
2013-06-30 11:15 ` [U-Boot] [PATCH 3/3] Makefile: fix readelf usage Andreas Bießmann
2013-07-01 19:00   ` Lubomir Popov
2013-07-04 12:09   ` Albert ARIBAUD
2013-07-04 13:25     ` Andreas Bießmann
2013-07-04 14:02       ` Albert ARIBAUD

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=51D1CE3F.5000000@myspectrum.nl \
    --to=jeroen@myspectrum.nl \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.