]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove asserts on vars declared as nonnull
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Fri, 10 Nov 2017 21:33:12 +0000 (21:33 +0000)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Fri, 10 Nov 2017 21:33:12 +0000 (21:33 +0000)
stops gcc6 complaints with -Wnonnull-compare

src/main/client.c
src/main/log.c

index e7a0b53469311d7ac5b91b94673ad3323224da0d..2229522e345934681b6f391cf1c339ae3b9d4573 100644 (file)
@@ -1095,9 +1095,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_inet_pton(&c->ipaddr, identifier, -1, AF_UNSPEC, true, true) < 0) {
index e875f648378bade97a8ffd97ff913669a174f34b..f66077110ccadb39d49e150d18c8238e71e0d440 100644 (file)
@@ -238,8 +238,6 @@ void vradlog_request(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *request, cha
 
        fr_log_t        *log_dst = uctx;
 
-       rad_assert(request);
-
        /*
         *      No output means no output.
         */
@@ -467,8 +465,6 @@ void radlog_request(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *request, char
        va_list         ap;
        log_dst_t       *dst_p;
 
-       rad_assert(request);
-
        if (!request->log.dst) return;
 
        va_start(ap, msg);
@@ -499,8 +495,6 @@ void radlog_request_error(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *request
        va_list         ap;
        log_dst_t       *dst_p;
 
-       rad_assert(request);
-
        if (!request->log.dst) return;
 
        va_start(ap, msg);
@@ -526,8 +520,6 @@ void radlog_request_perror(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *reques
 {
        char const *strerror;
 
-       rad_assert(request);
-
        if (!request->log.dst) return;
 
        /*
@@ -592,8 +584,6 @@ void radlog_request_marker(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *reques
        uint8_t unlang_indent;
        uint8_t module_indent;
 
-       rad_assert(request);
-
        if (idx >= sizeof(spaces)) {
                size_t offset = (idx - (sizeof(spaces) - 1)) + (sizeof(spaces) * 0.75);
                idx -= offset;