[DTrace-devel] [PATCH] Fix type of variables holding result of ctf_member_info()

Kris Van Hees kris.van.hees at oracle.com
Tue Jul 19 20:11:27 UTC 2022


The return type of ctf_member_info() is int, but is was being assigned
to variables declared as ctf_id_t and initialized as CTF_ERR.  The type
has been corrected (int), and the initialization is removed because it
is not necessary.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 libdtrace/dt_cc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libdtrace/dt_cc.c b/libdtrace/dt_cc.c
index 1d5d9289..eb9ea6c9 100644
--- a/libdtrace/dt_cc.c
+++ b/libdtrace/dt_cc.c
@@ -2419,7 +2419,7 @@ dt_link_construct(dtrace_hdl_t *dtp, const dt_probe_t *prp, dtrace_difo_t *dp,
 				ctf_file_t *cfp = dtp->dt_shared_ctf;
 				ctf_id_t type;
 				ctf_membinfo_t ctm;
-				ctf_id_t rc = CTF_ERR;
+				int rc;
 
 				if (!cfp)
 					return dt_set_errno(dtp, EDT_NOCTF);
@@ -2447,7 +2447,7 @@ dt_link_construct(dtrace_hdl_t *dtp, const dt_probe_t *prp, dtrace_difo_t *dp,
 				ctf_file_t *cfp = dtp->dt_shared_ctf;
 				ctf_id_t type;
 				ctf_membinfo_t ctm;
-				ctf_id_t rc = CTF_ERR;
+				int rc;
 				uint64_t total_offset;
 
 				if (!cfp)
-- 
2.34.1




More information about the DTrace-devel mailing list