public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Remove unwanted spaces when looking up builtin types
Date: Wed, 07 Jan 2015 07:03:00 -0000	[thread overview]
Message-ID: <20150107070337.GO5445@adacore.com> (raw)
In-Reply-To: <CAGyQ6gyvQ8kzit0LpkY0Nv6kLXQf5iTLCwYOYgoTJf-F-6F7XQ@mail.gmail.com>

> +/* Return 1 if C is a whitespace character, 0 otherwise.  */
> +
> +static int
> +whitespace_p (const char c)
> +{
> +  if (c == ' ' || c == '\n' || c == '\t')
> +    return 1;
> +  else
> +    return 0;

Why not using isspace directly? Apologies if this was explained
before, but then, a comment would be helpful, and maybe a more
specific function name.  My first reaction to this kind of routine
was that this should be in one of our "utils" files, so as to allow
other parts of the code to use it as well.

-- 
Joel

      reply	other threads:[~2015-01-07  7:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 18:50 Siva Chandra
2014-11-07 13:49 ` Siva Chandra
2014-11-18 23:59   ` Siva Chandra
2015-01-07  6:47 ` Siva Chandra
2015-01-07  7:03   ` Joel Brobecker [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=20150107070337.GO5445@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.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 read-only IMAP folder(s) and NNTP newsgroup(s).