From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22906 invoked by alias); 24 Feb 2004 22:32:57 -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 22896 invoked from network); 24 Feb 2004 22:32:54 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 24 Feb 2004 22:32:54 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i1OMWrb03609 for ; Tue, 24 Feb 2004 17:32:54 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i1OMWpM03681; Tue, 24 Feb 2004 17:32:51 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i1OMWnX01616; Tue, 24 Feb 2004 14:32:51 -0800 Message-ID: <403BD111.3060909@redhat.com> Date: Tue, 24 Feb 2004 22:32:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 MIME-Version: 1.0 To: Daniel Lucq CC: gdb-patches@sources.redhat.com Subject: Re: exec_file_hook_count data-type References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00700.txt.bz2 Daniel Lucq wrote: > Hi all, > > I suppose exec_file_hook_count in corefile.c should always be >= 0, so why > not make it an unsigned instead of an int? (yeah, I suppose this is a > minor issue, but still :-)). > > Regards, > Daniel Lucq Looks good. I won't demand that you use "unsigned int", but I'd like it. I don't think it's covered by the coding standard, but it seems to be the norm within gdb code (with exceptions), and in my old age I find consistency comforting. ;-) > --- corefile.c.orig Sun Feb 22 19:44:17 2004 > +++ corefile.c Sun Feb 22 19:45:18 2004 > @@ -53,7 +53,7 @@ > > hook_type exec_file_display_hook; /* the original hook */ > static hook_type *exec_file_extra_hooks; /* array of additional hooks */ > -static int exec_file_hook_count = 0; /* size of array */ > +static unsigned exec_file_hook_count = 0; /* size of array */ > > /* Binary file diddling handle for the core file. */ > > @@ -86,7 +86,7 @@ > static void > call_extra_exec_file_hooks (char *filename) > { > - int i; > + unsigned i; > > for (i = 0; i < exec_file_hook_count; i++) > (*exec_file_extra_hooks[i]) (filename); >