This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: lazily call save_current_space_and_thread


On Tue, 08 Mar 2011 17:51:56 +0100, Tom Tromey wrote:
> +/* If there is a selected frame, return it.  Otherwise, return NULL.  */
> +
> +struct frame_info *
> +get_selected_frame_if_set (void)
> +{
> +  if (selected_frame == NULL)
> +    return NULL;
> +  return get_selected_frame (NULL);
> +}

Maybe it could be just:
{
  return selected_frame;
}

It seems safe to me.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]