From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11050 invoked by alias); 24 May 2013 09:07:33 -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 11039 invoked by uid 89); 24 May 2013 09:07:33 -0000 X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-lb0-f180.google.com (HELO mail-lb0-f180.google.com) (209.85.217.180) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 24 May 2013 09:07:31 +0000 Received: by mail-lb0-f180.google.com with SMTP id r10so4376685lbi.39 for ; Fri, 24 May 2013 02:07:28 -0700 (PDT) X-Received: by 10.112.35.136 with SMTP id h8mr8621700lbj.78.1369386448849; Fri, 24 May 2013 02:07:28 -0700 (PDT) Received: from [130.237.20.66] (s1499.it.kth.se. [130.237.20.66]) by mx.google.com with ESMTPSA id zo6sm6186918lbb.9.2013.05.24.02.07.27 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 24 May 2013 02:07:27 -0700 (PDT) Message-ID: <1369386446.8127.51.camel@s1499.it.kth.se> Subject: Re: Small patch to enable build of gdb-7.6 for GNU/Hurd From: Svante Signell To: Pedro Alves Cc: Joel Brobecker , Sergio Durigan Junior , gdb-patches@sourceware.org Date: Fri, 24 May 2013 09:07:00 -0000 In-Reply-To: <519F2A7A.4050002@redhat.com> References: <1369326967.8127.33.camel@s1499.it.kth.se> <20130524042734.GG4017@adacore.com> <519F2A7A.4050002@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00918.txt.bz2 On Fri, 2013-05-24 at 09:53 +0100, Pedro Alves wrote: > On 05/24/2013 05:27 AM, Joel Brobecker wrote: > > On Thu, May 23, 2013 at 11:59:46PM -0300, Sergio Durigan Junior wrote: > >> Thanks for your patch, Svante. > >> > >> On Thursday, May 23 2013, Svante Signell wrote: > >> ... > > And quite honestly, I find this use of a macro in the middle of > > a function quite ugly and unnecessary, no matter what was done > > before. My preference mirrors Tom's suggestion, but failing that, > > I'd rather FMT be a const char * or a const char []. > > Agreed. > > const char fmt[] = "..." is better than 'const char *', as the > latter gives you an unnecessary extra pointer. > > Make that 'static const char fmt[] = "...";' even. > > But really alloca for potentially large/unbounded buffers is evil. > xstrprintf plus a cleanup would definitely be my preference. I will change to use xstrprintf instead. Updated patch with ChangeLog entry will follow shortly. Is it OK to modify also the other (preceding) function in the same way (for consistency)?