From 3748ada07352b7144766d988853b93f372e7a790 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 4 Aug 2014 16:06:20 +0200 Subject: gbproxy: Add a hint to the compiler that all parameters are not NULL In these functions we assume that peer is not NULL. Add a compiler attribute in the hope that either coverity or GCC/Clang will help us to find a misusage. Done with Jacob --- openbsc/src/gprs/gb_proxy.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index ff480ded8..efd35e0bd 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -1003,6 +1003,10 @@ struct gbproxy_peer *peer_by_bssgp_tlv(struct gbproxy_config *cfg, struct tlv_pa return NULL; } +static int gbprox_patch_dtap(struct msgb *msg, uint8_t *data, size_t data_len, + struct gbproxy_peer *peer, int *len_change, + struct gbproxy_parse_context *parse_ctx) __attribute__((nonnull)); + static int gbprox_patch_dtap(struct msgb *msg, uint8_t *data, size_t data_len, struct gbproxy_peer *peer, int *len_change, struct gbproxy_parse_context *parse_ctx) @@ -1075,6 +1079,10 @@ static int gbprox_patch_dtap(struct msgb *msg, uint8_t *data, size_t data_len, return 0; } +static void gbprox_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len, + struct gbproxy_peer *peer, int *len_change, + struct gbproxy_parse_context *parse_ctx) __attribute__((nonnull)); + static void gbprox_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len, struct gbproxy_peer *peer, int *len_change, struct gbproxy_parse_context *parse_ctx) -- cgit v1.2.3