[sr-dev] git:master:7e047f0f: auth_radius: fix gcc 7 warning
Victor Seva
linuxmaniac at torreviejawireless.org
Fri Dec 15 11:44:11 CET 2017
Module: kamailio
Branch: master
Commit: 7e047f0f2a9dd3432c293096fba0a07af93674f3
URL: https://github.com/kamailio/kamailio/commit/7e047f0f2a9dd3432c293096fba0a07af93674f3
Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2017-12-15T11:44:03+01:00
auth_radius: fix gcc 7 warning
> CC (gcc) [M auth_radius.so] sterman.o
> sterman.c: In function 'extract_avp':
> sterman.c:78:61: warning: comparison between pointer and zero character constant [-Wpointer-compare]
> if(!q && p == vp->strvalue && vp->strvalue + sizeof(char) != '\0') {
> ^~
> sterman.c:78:33: note: did you mean to dereference the pointer?
> if(!q && p == vp->strvalue && vp->strvalue + sizeof(char) != '\0') {
> ^
---
Modified: src/modules/auth_radius/sterman.c
---
Diff: https://github.com/kamailio/kamailio/commit/7e047f0f2a9dd3432c293096fba0a07af93674f3.diff
Patch: https://github.com/kamailio/kamailio/commit/7e047f0f2a9dd3432c293096fba0a07af93674f3.patch
---
diff --git a/src/modules/auth_radius/sterman.c b/src/modules/auth_radius/sterman.c
index db50b39df6..25eac9c9f5 100644
--- a/src/modules/auth_radius/sterman.c
+++ b/src/modules/auth_radius/sterman.c
@@ -75,7 +75,7 @@ static inline int extract_avp(
if(vp->attribute == attrs[A_SIP_AVP].v && vp->type == PW_TYPE_STRING) {
p = strchr(vp->strvalue, '#');
q = strchr(vp->strvalue, ':');
- if(!q && p == vp->strvalue && vp->strvalue + sizeof(char) != '\0') {
+ if(!q && p == vp->strvalue && *(vp->strvalue + sizeof(char)) != '\0') {
r = p;
r = strchr(r++, '#');
} else
More information about the sr-dev
mailing list