From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21602 invoked by alias); 19 Oct 2011 14:08:42 -0000 Received: (qmail 21592 invoked by uid 22791); 19 Oct 2011 14:08:41 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_CP X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Oct 2011 14:08:22 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9JE8MvG018259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 19 Oct 2011 10:08:22 -0400 Received: from host1.jankratochvil.net (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9JE8JWP027867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 19 Oct 2011 10:08:21 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p9JE8IpO032061; Wed, 19 Oct 2011 16:08:18 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p9JE8HnB032053; Wed, 19 Oct 2011 16:08:17 +0200 Date: Wed, 19 Oct 2011 14:40:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: Mark Kettenis , gdb-patches@sourceware.org, ppluzhnikov@google.com Subject: Re: [patch 1/3] Code cleanup: strcpy + strlen -> sprintf Message-ID: <20111019140817.GA4704@host1.jankratochvil.net> References: <20111018205108.GA31533@host1.jankratochvil.net> <201110182209.p9IM9o3F026010@glazunov.sibelius.xs4all.nl> <20111019082833.GA8886@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2011-10/txt/msg00528.txt.bz2 On Wed, 19 Oct 2011 15:57:44 +0200, Tom Tromey wrote: > Jan> I am unfamiliar with gdbserver but there is no single use of snprintf while > Jan> 75 uses of sprintf. Isn't it for some platform compatibility? > > The gnulib page is informative: > > http://www.gnu.org/s/hello/manual/gnulib/snprintf.html thanks, this and http://www.gnu.org/s/hello/manual/gnulib/sprintf.html would suggest sprintf wrt OS compatibility is OK but snprintf is not and therefore this [patch 1/3] is the best + compatible variant. Still I no longer mind much, I am going to drop this 3-part series (unless discussed otherwise) and return back to the former form with incompatible/new SVR4 protocol and separate protocol producer/consumer: Re: [patch 3/3] Implement qXfer:libraries for Linux/gdbserver #2 http://sourceware.org/ml/gdb-patches/2011-10/msg00175.html This variant has no technical advantages, the code is just more tricky. Thanks, Jan