diff options
author | dim <dim@FreeBSD.org> | 2015-01-28 21:33:49 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-28 21:33:49 +0000 |
commit | 323b7d583ce50019870d293b4a4438a20ef4070f (patch) | |
tree | d5f1bc0e430f4460a690cf26074024d66aa93f89 /usr.sbin/ppp/ipcp.c | |
parent | 51dfb55a0065d375570f0929e580f732b3a622a0 (diff) | |
download | FreeBSD-src-323b7d583ce50019870d293b4a4438a20ef4070f.zip FreeBSD-src-323b7d583ce50019870d293b4a4438a20ef4070f.tar.gz |
Fix multiple instances of the following clang 3.6.0 warning in ppp:
usr.sbin/ppp/command.c:2054:74: error: address of array 'arg->bundle->radius.cfg.file'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if (arg->bundle->radius.alive.interval && !arg->bundle->radius.cfg.file) {
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In all cases, the file field of struct radius is a char array, but the
intent was to check whether the string is empty, so add an indirection
to achieve that. Use a similar approach for the sockname field of
struct server.
Diffstat (limited to 'usr.sbin/ppp/ipcp.c')
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 80b3a1b..dbb1e79 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -880,7 +880,7 @@ IpcpLayerDown(struct fsm *fp) radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, RAD_STOP, &ipcp->throughput); - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE, NULL, NULL); radius_StopTimer(&fp->bundle->radius); @@ -949,7 +949,7 @@ IpcpLayerUp(struct fsm *fp) radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, RAD_START, &ipcp->throughput); - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE, NULL, NULL); radius_StartTimer(fp->bundle); |