From 4776245dfb0ca70058881bc2059dc992581d041b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Tue, 19 Sep 2017 14:39:47 +0200 Subject: [PATCH] afb-context: add const qualifier for api_key MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I138d70698342cc2350d4f9098bcf5c486d16faba Signed-off-by: José Bollo --- src/afb-context.c | 4 ++-- src/afb-context.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/afb-context.c b/src/afb-context.c index 81f21ff4..11abcd48 100644 --- a/src/afb-context.c +++ b/src/afb-context.c @@ -163,9 +163,9 @@ int afb_context_check_loa(struct afb_context *context, unsigned loa) return afb_context_get_loa(context) >= loa; } -static inline void *loa_key(struct afb_context *context) +static inline const void *loa_key(struct afb_context *context) { - return (void*)(1+(intptr_t)(context->api_key)); + return (const void*)(1+(intptr_t)(context->api_key)); } static inline void *loa2ptr(unsigned loa) diff --git a/src/afb-context.h b/src/afb-context.h index f1af3622..47e488c4 100644 --- a/src/afb-context.h +++ b/src/afb-context.h @@ -22,7 +22,7 @@ struct afb_session; struct afb_context { struct afb_session *session; - void *api_key; + const void *api_key; struct afb_context *super; union { unsigned flags; -- 2.16.6