From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 21D5A384CBAF; Fri, 15 Dec 2023 21:05:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21D5A384CBAF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702674309; bh=iIbjf0rsu4cKLNBAUmizgJrU4VSqRah4tgxejZH+LZo=; h=From:To:Subject:Date:From; b=azOVXCfFMTY4932/a+ufWX0uIEv1pL1StQKDhE0tmAcLlhJNj5PC1A8H4z89aN+Wp cJt31o2XqdTxyOzM6iXAm9vzDiSXSdWHX6Aiw9xokAT8VIk3XfZGyFPLOryBfKEZGF iOdG7PZn85MuTA60sP2QCXzwUl9cbzGFSPcyLddY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Boolify ada_type_match X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: fc4ddd6734e522debe7e99812b743b368f1cc946 X-Git-Newrev: 1414fbf941140746862b920c6a1034099c4ff3d1 Message-Id: <20231215210509.21D5A384CBAF@sourceware.org> Date: Fri, 15 Dec 2023 21:05:09 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1414fbf94114= 0746862b920c6a1034099c4ff3d1 commit 1414fbf941140746862b920c6a1034099c4ff3d1 Author: Tom Tromey Date: Thu Nov 30 10:31:12 2023 -0700 Boolify ada_type_match =20 This changes ada_type_match to return bool. Diff: --- gdb/ada-lang.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index edd68cd2c32..bbb876127bd 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -3934,7 +3934,7 @@ ada_resolve_variable (struct symbol *sym, const struc= t block *block, /* The term "match" here is rather loose. The match is heuristic and liberal. */ =20 -static int +static bool ada_type_match (struct type *ftype, struct type *atype) { ftype =3D ada_check_typedef (ftype); @@ -3951,11 +3951,11 @@ ada_type_match (struct type *ftype, struct type *at= ype) return ftype->code () =3D=3D atype->code (); case TYPE_CODE_PTR: if (atype->code () !=3D TYPE_CODE_PTR) - return 0; + return false; atype =3D atype->target_type (); /* This can only happen if the actual argument is 'null'. */ if (atype->code () =3D=3D TYPE_CODE_INT && atype->length () =3D=3D 0) - return 1; + return true; return ada_type_match (ftype->target_type (), atype); case TYPE_CODE_INT: case TYPE_CODE_ENUM: @@ -3965,9 +3965,9 @@ ada_type_match (struct type *ftype, struct type *atyp= e) case TYPE_CODE_INT: case TYPE_CODE_ENUM: case TYPE_CODE_RANGE: - return 1; + return true; default: - return 0; + return false; } =20 case TYPE_CODE_ARRAY: