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

Eugene Loh eugene.loh at oracle.com
Wed Jul 20 03:39:51 UTC 2022


Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
s/is was/is/

On 7/19/22 13:11, Kris Van Hees via DTrace-devel wrote:
> 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)



More information about the DTrace-devel mailing list