[master] 1b04343a0 jail enum assertions
Dridi Boukelmoune
dridi at varni.sh
Fri May 29 16:38:18 UTC 2020
On Fri, May 29, 2020 at 4:23 PM Nils Goroll <nils.goroll at uplex.de> wrote:
>
>
> commit 1b04343a0d1766d94af03a35bb53ca0181a728cb
> Author: Nils Goroll <nils.goroll at uplex.de>
> Date: Fri May 29 17:41:56 2020 +0200
>
> jail enum assertions
>
> diff --git a/bin/varnishd/mgt/mgt.h b/bin/varnishd/mgt/mgt.h
> index a2b3a3d56..4973abb4d 100644
> --- a/bin/varnishd/mgt/mgt.h
> +++ b/bin/varnishd/mgt/mgt.h
> @@ -110,6 +110,11 @@ enum jail_master_e {
> JAIL_MASTER_KILL,
> };
>
> +#define ASSERT_JAIL_MASTER(x) do { \
> + assert(x >= JAIL_MASTER_LOW); \
> + assert(x <= JAIL_MASTER_KILL); \
> + } while (0)
> +
This assertion breaks with targets where enums are unsigned. You
might as well revert the last two commits and turn the enums into
structs right off the bat.
My USD 0.02,
Dridi
More information about the varnish-commit
mailing list