HomeFreeBSD

Fix multiple instances of the following clang 3.6.0 warning in ppp:

Description

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.

Details

Provenance
dimAuthored on Jan 28 2015, 9:33 PM
Parents
rG3f7acdfe6e03: Fix the following clang 3.6.0 warnings in pciconf:
Branches
Unknown
Tags
Unknown

Event Timeline