Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix gdb/277 by separating types
Date: Mon, 13 May 2002 06:41:00 -0000	[thread overview]
Message-ID: <20020513134136.GA19484@nevyn.them.org> (raw)
In-Reply-To: <Pine.SUN.3.91.1020513081759.8317L-100000@is>

On Mon, May 13, 2002 at 08:20:32AM +0300, Eli Zaretskii wrote:
> 
> On Sun, 12 May 2002, Daniel Jacobowitz wrote:
> 
> > This patch requires my previous cleanup patch.  It fixes a test in
> > gdb.c++/method.exp for GCC 3.x/stabs+, and closes gdb/277.
> 
> A minor comment about style:
> 
> >        type = (struct type *) xmalloc (sizeof (struct type));
> > +      memset ((char *) (type), 0, sizeof (struct type));
> 
> Why the cast to `char *' in the first argument of memset?  I thought, 
> since we require an ISO C compiler, we shouldn't need those anymore.
> (There are more casts like that in the patch.)
> 
> The same goes for casting the return value of xmalloc, I think.

Thanks for catching these.  The reason is simple: they were all copies
of a pre-existing memset in alloc_type, and I didn't stop to think
about them :)

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2002-05-13 13:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-12 17:53 Daniel Jacobowitz
2002-05-12 22:22 ` Eli Zaretskii
2002-05-13  6:30   ` Andrew Cagney
2002-05-13  6:41   ` Daniel Jacobowitz [this message]
2002-05-12 19:19 Michael Elizabeth Chastain
2002-05-12 19:38 ` Daniel Jacobowitz
2002-05-12 20:10 Michael Elizabeth Chastain
2002-05-12 20:16 ` Daniel Jacobowitz
2002-05-12 20:13 Michael Elizabeth Chastain

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=20020513134136.GA19484@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=eliz@is.elta.co.il \
    --cc=gdb-patches@sources.redhat.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