[libvirt] [PATCH 02/10] Add VIR_SECRET_GET_VALUE_INTERNAL_CALL.

Miloslav Trmac mitr at redhat.com
Tue Sep 8 10:02:36 UTC 2009


----- "Daniel Veillard" <veillard at redhat.com> wrote:
> > +/* Make sure ... INTERNAL_CALL can not be set by the caller */
> > +verify((VIR_SECRET_GET_VALUE_INTERNAL_CALL &
> > +        VIR_SECRET_GET_VALUE_FLAGS_MASK) == 0);
> 
>   ??? what's that ? an assert at compile time ? I don't know that construct
> I would rather avoid it if it's not portable.
Yes, a compile-time assert, provided by gnulib.  The mechanism depends only on ISO C, and gnulib/lib/verify.h contains detailed comments about why the particular variant was chosen.  It seems safe enough to me.
    Mirek




More information about the libvir-list mailing list