Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: woodzltc@cn.ibm.com
Cc: eliz@gnu.org, gdb-patches@sources.redhat.com
Subject: Re: two questions about GDB coding standards
Date: Wed, 18 May 2005 13:02:00 -0000	[thread overview]
Message-ID: <200505181016.j4IAG9II016351@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <1116409880.428b10186817f@imap.linux.ibm.com> (message from Wu Zhou on Wed, 18 May 2005 05:51:20 -0400)

   Date: Wed, 18 May 2005 05:51:20 -0400
   From: Wu Zhou <woodzltc@cn.ibm.com>

   Quoting Eli Zaretskii <eliz@gnu.org>:

   > > Date: Tue, 17 May 2005 11:13:21 -0400
   > > From: Wu Zhou <woodzltc@cn.ibm.com>
   > > 
   > > 1. In section 13.4.2(memory management), it is said that gdb uses the 
   > > string function xstrdup and the print function xasprintf.  But I saw 
   > > in the source codes that most places use sprintf instead.
   > 
   > This is just a matter of converting the uses of sprintf into safer
   > code using xstrdup, xasprintf, xsprintf, etc.  Volunteers are welcome.

   I'd like to contribute.  But running splint against GDB source tree, I
   find over 230 usages of sprintf.  If the conversion depends completely
   on hand work, the workload might be quite big.  Is there any method to
   achieve this more quickly?  to say, a script to handle it automatically,
   or any others?  

I'm afraid not; but hey you don't have to do all of them ;-).  Start
with the ones in code that you're a bit familliar with, and see where
you end up.  Even if you only convert 10% it is very useful.

Cheers,

Mark


  reply	other threads:[~2005-05-18 10:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18 10:25 Wu Zhou
2005-05-18 13:02 ` Mark Kettenis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-05-19  8:47 Wu Zhou
2005-05-20  1:45 ` Eli Zaretskii
2005-05-19  8:08 Wu Zhou
2005-05-18 15:43 Wu Zhou
2005-05-18 19:53 ` Eli Zaretskii
2005-05-17 20:19 Wu Zhou
2005-05-17 20:30 ` Eli Zaretskii
2005-05-17 20:33 ` Mark Kettenis

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=200505181016.j4IAG9II016351@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=woodzltc@cn.ibm.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