From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24122 invoked by alias); 13 Mar 2002 17:53:25 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24022 invoked from network); 13 Mar 2002 17:53:16 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 13 Mar 2002 17:53:17 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 8E87D1E5D2 for ; Wed, 13 Mar 2002 18:53:16 +0100 (MET) X-Authentication-Warning: sykes.suse.de: schwab set sender to schwab@suse.de using -f To: Michal Ludvig Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] remote debugging patches References: <3C8BA71F.20807@suse.cz> <20020310143517.B3933@nevyn.them.org> <3C8BB74D.90705@suse.cz> <20020310173046.C9299@nevyn.them.org> <3C8CC514.4010207@suse.cz> <3C8D6646.8030809@cygnus.com> <20020311214743.B462@nevyn.them.org> <3C8F5EA6.9050909@suse.cz> <3C8F7B9A.9050002@suse.cz> X-Yow: Is it 1974? What's for SUPPER? Can I spend my COLLEGE FUND in one wild afternoon?? From: Andreas Schwab Date: Wed, 13 Mar 2002 09:53:00 -0000 In-Reply-To: <3C8F7B9A.9050002@suse.cz> (Michal Ludvig's message of "Wed, 13 Mar 2002 17:17:30 +0100") Message-ID: User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-03/txt/msg00196.txt.bz2 Michal Ludvig writes: |> Andreas Schwab wrote: |> > Why are you truncating the name to 100 characters? |> |> It is just an informational message and 100 chars shoud be enough almost |> everytime. |> 1) IPv4 (or IPv6 sometime in the future) address can't be as long. |> 2) I didn't expect to have a resolved domainname such long. |> 3) Neither serial port names are so long. |> 4) I take care about buffer-overruns using snprintf. Maybe it's just me, but I hate arbitrary limits. There is no need for sprintf at this point anyway. I'd suggest to define another variable that either points to name or to the result of inet_ntoa and use that in the fprintf call. No need for namebuf either. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."