From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id A09A13952036; Mon, 5 Dec 2022 21:39:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A09A13952036 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670276346; bh=Z9W4cOqnnGwlX4fFyhaWzgJLvtIxAd4wzMGReDWOZR4=; h=From:To:Subject:Date:From; b=orQdpY0rKHm/+ObNbiS2Q9IPtvgkDC39ojVahoaHHYqV5/o/Ccuu20U1t1Q9fWct7 GtjtTIPs2V6MRiN3ismMfa+0kiPJEr/Z9gdgL7Ps1ZDnV7W41GiBvevNavG4gJhk4x R3rJEiLY3OChYl2G76kB7XUoiSjbeh7iMeSSEn6M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/linux-nat: bool-ify linux_nat_get_siginfo X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: 0acd1110b69839d484b4b536a24b3477b06d6dfa X-Git-Newrev: ef632b4bf84e6e60e58b76b7e7471c82e1507854 Message-Id: <20221205213906.A09A13952036@sourceware.org> Date: Mon, 5 Dec 2022 21:39:06 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Def632b4bf84e= 6e60e58b76b7e7471c82e1507854 commit ef632b4bf84e6e60e58b76b7e7471c82e1507854 Author: Simon Marchi Date: Fri Dec 2 15:09:21 2022 -0500 gdb/linux-nat: bool-ify linux_nat_get_siginfo =20 Change return type to bool. =20 Change-Id: I1bf0360bfdd1b5994cd0f96c268d806f96fe51a4 Diff: --- gdb/linux-nat.c | 6 +++--- gdb/linux-nat.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 9ab8b845cbb..7b6a1f98d66 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -4439,7 +4439,7 @@ linux_nat_target::linux_nat_target () =20 /* See linux-nat.h. */ =20 -int +bool linux_nat_get_siginfo (ptid_t ptid, siginfo_t *siginfo) { int pid =3D get_ptrace_pid (ptid); @@ -4449,9 +4449,9 @@ linux_nat_get_siginfo (ptid_t ptid, siginfo_t *siginf= o) if (errno !=3D 0) { memset (siginfo, 0, sizeof (*siginfo)); - return 0; + return false; } - return 1; + return true; } =20 /* See nat/linux-nat.h. */ diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h index a9b91a5e908..576924395e7 100644 --- a/gdb/linux-nat.h +++ b/gdb/linux-nat.h @@ -330,8 +330,8 @@ extern void linux_unstop_all_lwps (void); void linux_nat_switch_fork (ptid_t new_ptid); =20 /* Store the saved siginfo associated with PTID in *SIGINFO. - Return 1 if it was retrieved successfully, 0 otherwise (*SIGINFO is + Return true if it was retrieved successfully, false otherwise (*SIGINFO= is uninitialized in such case). */ -int linux_nat_get_siginfo (ptid_t ptid, siginfo_t *siginfo); +bool linux_nat_get_siginfo (ptid_t ptid, siginfo_t *siginfo); =20 #endif /* LINUX_NAT_H */