From f72627c3f05da804f75551c96ad0bdf037e771c4 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Thu, 8 Jul 2021 00:00:44 +1000 Subject: [PATCH] gss: make IS_DCE_STYLE an inline function To avoid future regressions such as the one corrected in 0dd19003, make IS_DCE_STYLE() an inline function (rather than a macro) so that its argument is typed. --- lib/gssapi/krb5/gsskrb5_locl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/gssapi/krb5/gsskrb5_locl.h b/lib/gssapi/krb5/gsskrb5_locl.h index 2d53f055f..ef3f21903 100644 --- a/lib/gssapi/krb5/gsskrb5_locl.h +++ b/lib/gssapi/krb5/gsskrb5_locl.h @@ -58,7 +58,6 @@ typedef struct gsskrb5_ctx { struct krb5_auth_context_data *auth_context; struct krb5_auth_context_data *deleg_auth_context; krb5_principal source, target; -#define IS_DCE_STYLE(ctx) (((ctx)->flags & GSS_C_DCE_STYLE) != 0) OM_uint32 flags; enum { LOCAL = 1, OPEN = 2, COMPAT_OLD_DES3 = 4, @@ -90,6 +89,12 @@ typedef struct gsskrb5_ctx { krb5_crypto crypto; } *gsskrb5_ctx; +static inline krb5_boolean +IS_DCE_STYLE(gsskrb5_ctx ctx) +{ + return (ctx->flags & GSS_C_DCE_STYLE) != 0; +} + typedef struct { krb5_principal principal; char *destination_realm; /* Realm of acceptor service, if delegated */