]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove asserts on vars declared as nonnull
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Fri, 27 Oct 2017 18:06:56 +0000 (19:06 +0100)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Fri, 27 Oct 2017 18:47:05 +0000 (19:47 +0100)
stops gcc6 complaints with -Wnonnull-compare

src/main/client.c
src/main/log.c
src/modules/rlm_ldap/ldap.c

index bf387689dbe4cf5a49c4313a88047a60ddb1f448..3c4feb7d5076b5e138f38d5e2674038ac7322a7e 100644 (file)
@@ -1170,9 +1170,6 @@ RADCLIENT *client_afrom_query(TALLOC_CTX *ctx, char const *identifier, char cons
        RADCLIENT *c;
        char buffer[128];
 
-       rad_assert(identifier);
-       rad_assert(secret);
-
        c = talloc_zero(ctx, RADCLIENT);
 
        if (fr_pton(&c->ipaddr, identifier, -1, AF_UNSPEC, true) < 0) {
index 3ead46e08016cd5e26418fa605f4e04b3699eb1c..21b21b3071470c307ea48f9ed873405146689623 100644 (file)
@@ -630,8 +630,6 @@ void vradlog_request(log_type_t type, log_lvl_t lvl, REQUEST *request, char cons
        uint8_t indent;
        va_list aq;
 
-       rad_assert(request);
-
        /*
         *      Debug messages get treated specially.
         */
@@ -782,8 +780,6 @@ void radlog_request(log_type_t type, log_lvl_t lvl, REQUEST *request, char const
 {
        va_list ap;
 
-       rad_assert(request);
-
        if (!request->log.func && !(type & L_DBG)) return;
 
        va_start(ap, msg);
@@ -812,8 +808,6 @@ void radlog_request_error(log_type_t type, log_lvl_t lvl, REQUEST *request, char
 {
        va_list ap;
 
-       rad_assert(request);
-
        va_start(ap, msg);
        if (request->log.func) request->log.func(type, lvl, request, msg, ap);
        else if (!(type & L_DBG)) vradlog_request(type, lvl, request, msg, ap);
@@ -836,8 +830,6 @@ void radlog_request_marker(log_type_t type, log_lvl_t lvl, REQUEST *request,
        char const *prefix = "";
        uint8_t indent;
 
-       rad_assert(request);
-
        if (idx >= sizeof(spaces)) {
                size_t offset = (idx - (sizeof(spaces) - 1)) + (sizeof(spaces) * 0.75);
                idx -= offset;
index d83f0a099e33e8b80e9a8963918ce68f3d705f81..0eb4144ebd0bd3a08d6d277bdc8c9eb556171d82 100644 (file)
@@ -1331,8 +1331,6 @@ int rlm_ldap_global_init(rlm_ldap_t *inst)
 {
        int ldap_errno;
 
-       rad_assert(inst); /* clang scan */
-
 #define do_ldap_global_option(_option, _name, _value) \
        if (ldap_set_option(NULL, _option, _value) != LDAP_OPT_SUCCESS) { \
                ldap_get_option(NULL, LDAP_OPT_ERROR_NUMBER, &ldap_errno); \