[sr-dev] git:master:4e2f17df: misc_radius: fix compilation warning

Victor Seva linuxmaniac at torreviejawireless.org
Tue Jun 7 12:19:48 CEST 2016


Module: kamailio
Branch: master
Commit: 4e2f17dfc6ae25739cb40328f3d5636ea1ab6fca
URL: https://github.com/kamailio/kamailio/commit/4e2f17dfc6ae25739cb40328f3d5636ea1ab6fca

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2016-06-06T12:05:39+02:00

misc_radius: fix compilation warning

> functions.c:47:27: warning: comparison of array 'vp->strvalue' equal to a null pointer is always false [-Wtautological-pointer-compare]
>         if (vp->lvalue==0 || vp->strvalue==0)
>                              ~~~~^~~~~~~~  ~
> 1 warning generated.

---

Modified: modules/misc_radius/functions.c

---

Diff:  https://github.com/kamailio/kamailio/commit/4e2f17dfc6ae25739cb40328f3d5636ea1ab6fca.diff
Patch: https://github.com/kamailio/kamailio/commit/4e2f17dfc6ae25739cb40328f3d5636ea1ab6fca.patch

---

diff --git a/modules/misc_radius/functions.c b/modules/misc_radius/functions.c
index fb9ec78..e171468 100644
--- a/modules/misc_radius/functions.c
+++ b/modules/misc_radius/functions.c
@@ -44,7 +44,7 @@ static inline int extract_avp(VALUE_PAIR* vp, unsigned short *flags,
 	char *end;
 
 	/* empty? */
-	if (vp->lvalue==0 || vp->strvalue==0)
+	if (vp->lvalue==0)
 		goto error;
 
 	p = vp->strvalue;




More information about the sr-dev mailing list