Re: [PATCHv2 2/3] gdb: Change a VEC to std::vector in btrace.{c,h}

Simon Marchi
2019-09-26T02:35:18Z

On 2019-09-25 11:54 a.m., Andrew Burgess wrote:
> @@ -2983,8 +2983,10 @@ btrace_maint_decode_pt (struct btrace_maint_info *maint,
> if (maint_btrace_pt_skip_pad == 0 || packet.packet.type != ppt_pad)
> {
> packet.errcode = pt_errcode (errcode);
> - VEC_safe_push (btrace_pt_packet_s, maint->variant.pt.packets,
> - &packet);
> + if (maint->variant.pt.packets == NULL)
> + maint->variant.pt.packets
> + = new std::vector <btrace_pt_packet>;

This line fits on a single line as well.

Otherwise, patches 1 and 2 LGTM.

Thanks,

Simon