From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11686 invoked by alias); 26 Sep 2019 02:35:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11673 invoked by uid 89); 26 Sep 2019 02:35:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Sep 2019 02:35:16 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 117C01E4A4; Wed, 25 Sep 2019 22:35:14 -0400 (EDT) Subject: Re: [PATCHv2 2/3] gdb: Change a VEC to std::vector in btrace.{c,h} To: Andrew Burgess , gdb-patches Cc: Tom Tromey References: From: Simon Marchi Message-ID: <0ecd9d4e-f6cb-494e-3289-abad97b57831@simark.ca> Date: Thu, 26 Sep 2019 02:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-09/txt/msg00500.txt.bz2 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 ; This line fits on a single line as well. Otherwise, patches 1 and 2 LGTM. Thanks, Simon