diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-04 16:06:20 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-04 16:06:20 +0200 |
commit | 3748ada07352b7144766d988853b93f372e7a790 (patch) | |
tree | 27bcef353644c2109e14812bed1c665a6ab074e0 /openbsc | |
parent | eece6277992a38559d6778badfb8840773f4108d (diff) |
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
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/gprs/gb_proxy.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ -1005,6 +1005,10 @@ struct gbproxy_peer *peer_by_bssgp_tlv(struct gbproxy_config *cfg, struct tlv_pa 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) { struct gsm48_hdr *g48h; @@ -1077,6 +1081,10 @@ static int gbprox_patch_dtap(struct msgb *msg, uint8_t *data, size_t data_len, 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) { struct gprs_llc_hdr_parsed ghp = {0}; |