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: [PATCH 3/3] Convert default_child_has_foo functions to process_stratum_target methods


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> +bool
Pedro> +process_stratum_target::has_all_memory ()
Pedro> +{
Pedro> +  /* If no inferior selected, then we can't read memory here.  */
Pedro> +  if (inferior_ptid == null_ptid)
Pedro> +    return false;
Pedro> +
Pedro> +  return true;

I don't really care too much but I was wondering why not just

  return inferior_ptid != null_ptid;

Pedro> +bool
Pedro> +process_stratum_target::has_execution (ptid_t the_ptid)
Pedro> +{
Pedro> +  /* If there's no thread selected, then we can't make it run through
Pedro> +     hoops.  */
Pedro> +  if (the_ptid == null_ptid)
Pedro> +    return 0;
Pedro> +
Pedro> +  return 1;

This one should use true/false.

Tom


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