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 v6 1/5] tdesc: handle arbitrary strings in tdesc_register_in_reggroup_p


Stafford Horne <shorne@gmail.com> writes:
>  
>        if (reggroup == general_reggroup)
>  	return general_p;
> +
> +      if (strcmp (reg->group, reggroup_name (reggroup)) == 0)
> +	return 1;
> +
>      }

I read the patch again, and find that we can replace the whole block in
"if (reg != NULL && reg->group != NULL)" with the code this patch adds,
like this,

  if (reg != NULL && reg->group != NULL
      && (strcmp (reg->group, reggroup_name (reggroup)) == 0))
     return 1;

-- 
Yao (齐尧)


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