From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33691 invoked by alias); 2 Apr 2018 02:28:54 -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 33679 invoked by uid 89); 2 Apr 2018 02:28:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Mon, 02 Apr 2018 02:28:53 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A60B01E4B2; Sun, 1 Apr 2018 22:28:51 -0400 (EDT) Subject: Re: [RFA 07/10] Change streq to return bool To: Tom Tromey , gdb-patches@sourceware.org References: <20180401163539.15314-1-tom@tromey.com> <20180401163539.15314-8-tom@tromey.com> From: Simon Marchi Message-ID: <73e24083-9174-1044-5637-2325ecfabc29@simark.ca> Date: Mon, 02 Apr 2018 02:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180401163539.15314-8-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-04/txt/msg00034.txt.bz2 On 2018-04-01 12:35 PM, Tom Tromey wrote: > diff --git a/gdb/utils.h b/gdb/utils.h > index 0de0fe2baa..7c211391e0 100644 > --- a/gdb/utils.h > +++ b/gdb/utils.h > @@ -89,7 +89,15 @@ extern int strcmp_iw (const char *string1, const char *string2); > > extern int strcmp_iw_ordered (const char *, const char *); > > -extern int streq (const char *, const char *); > +/* Return true if the strings are equal. This uses strcmp but inverts > + the result. */ Just a nit: Personally, I wouldn't include the second sentence. These comments should not discuss the internal implementation of functions if it's not necessary. Simon