[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [COMMITTED] pkl: add assertion to `pvm_make_array_type'
From: |
Jose E. Marchesi |
Subject: |
Re: [COMMITTED] pkl: add assertion to `pvm_make_array_type' |
Date: |
Fri, 28 Oct 2022 01:14:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Mohammad.
> diff --git a/libpoke/pvm-val.c b/libpoke/pvm-val.c
> index 641fbd8b..54341761 100644
> --- a/libpoke/pvm-val.c
> +++ b/libpoke/pvm-val.c
> @@ -527,12 +527,14 @@ pvm_make_offset_type (pvm_val base_type, pvm_val unit)
> }
>
> pvm_val
> -pvm_make_array_type (pvm_val type, pvm_val bound)
> +pvm_make_array_type (pvm_val type, pvm_val bounder)
> {
> pvm_val atype = pvm_make_type (PVM_TYPE_ARRAY);
>
> + assert (bounder);
I think this ought to be:
assert (bounder != PVM_NULL);
> PVM_VAL_TYP_A_ETYPE (atype) = type;
> - PVM_VAL_TYP_A_BOUND (atype) = bound;
> + PVM_VAL_TYP_A_BOUND (atype) = bounder;
> return atype;
> }