Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@codesourcery.com>
To: Nathan Sidwell <nathan@codesourcery.com>
Cc: gdb@sourceware.org
Subject: Re: reset fileio
Date: Wed, 24 May 2006 13:06:00 -0000	[thread overview]
Message-ID: <20060524124120.GA25225@nevyn.them.org> (raw)
In-Reply-To: <4474131D.2080805@codesourcery.com>

On Wed, May 24, 2006 at 09:02:37AM +0100, Nathan Sidwell wrote:
> + /* Close any open descriptors, and reinitialize the file mapping */

Period at the end of the comment.

> + void
> + remote_fileio_reset (void)
> + {
> +   int ix;
> + 
> +   for (ix = 0; ix != remote_fio_data.fd_map_size; ix++)
> +     {
> +       int fd = remote_fio_data.fd_map[ix];
> + 
> +       if (fd >= 0)
> + 	close (fd);
> +     }
> +   free (remote_fio_data.fd_map);
> +   remote_fio_data.fd_map = NULL;
> +   remote_fio_data.fd_map_size = 0;
> + }

Won't this free NULL if the target hadn't initialized fileio?  I think
that's non-portable.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-05-24 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 12:41 Nathan Sidwell
2006-05-24 13:06 ` Daniel Jacobowitz [this message]
2006-05-24 21:11   ` Nathan Sidwell
2006-06-17 21:16   ` 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=20060524124120.GA25225@nevyn.them.org \
    --to=dan@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=nathan@codesourcery.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