@@ -38,16 +38,13 @@ RCSID("$Id$")
3838#include <freeradius-devel/util/chap.h>
3939#ifdef HAVE_OPENSSL_SSL_H
4040#include <openssl/ssl.h>
41- #include <freeradius-devel/util/md5.h>
4241#include <freeradius-devel/util/md4.h>
4342#endif
44- #include <ctype.h>
4543
4644#ifdef HAVE_GETOPT_H
4745# include <getopt.h>
4846#endif
4947
50- #include <assert.h>
5148
5249typedef struct request_s request_t ; /* to shut up warnings about mschap.h */
5350
@@ -60,7 +57,7 @@ typedef struct request_s request_t; /* to shut up warnings about mschap.h */
6057 _attr = fr_pair_find_by_da(&request->request_pairs, NULL, _da); \
6158 if (!_attr) { \
6259 _attr = fr_pair_afrom_da(request, _da); \
63- assert (_attr != NULL); \
60+ fr_assert (_attr != NULL); \
6461 fr_pair_append(&request->request_pairs, _attr); \
6562 } \
6663 } while (0)
@@ -492,7 +489,7 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files)
492489 bool coa_reply_done = false;
493490 bool coa_filter_done = false;
494491
495- assert (files -> packets != NULL );
492+ fr_assert (files -> packets != NULL );
496493
497494 /*
498495 * Determine where to read the VP's from.
@@ -953,7 +950,7 @@ static void deallocate_id(rc_request_t *request)
953950 */
954951static int send_one_packet (rc_request_t * request )
955952{
956- assert (request -> done == false);
953+ fr_assert (request -> done == false);
957954
958955#ifdef STATIC_ANALYZER
959956 if (!secret ) fr_exit_now (1 );
@@ -973,7 +970,7 @@ static int send_one_packet(rc_request_t *request)
973970 if (!request -> tries || request -> packet -> id == -1 ) {
974971 bool rcode ;
975972
976- assert (request -> reply == NULL );
973+ fr_assert (request -> reply == NULL );
977974
978975 /*
979976 * Didn't find a free packet ID, we're not done,
@@ -1018,8 +1015,8 @@ static int send_one_packet(rc_request_t *request)
10181015 goto retry ;
10191016 }
10201017
1021- assert (request -> packet -> id != -1 );
1022- assert (request -> packet -> data == NULL );
1018+ fr_assert (request -> packet -> id != -1 );
1019+ fr_assert (request -> packet -> data == NULL );
10231020
10241021 /*
10251022 * Update the password, so it can be encrypted with the
@@ -1092,7 +1089,7 @@ static int send_one_packet(rc_request_t *request)
10921089 * We're not trying later, maybe the packet is done.
10931090 */
10941091 if (request -> tries == retries ) {
1095- assert (request -> packet -> id >= 0 );
1092+ fr_assert (request -> packet -> id >= 0 );
10961093
10971094 /*
10981095 * Delete the request from the tree of
@@ -1206,7 +1203,7 @@ static int recv_coa_packet(fr_time_delta_t wait_time)
12061203 talloc_free (packet );
12071204 return 0 ;
12081205 }
1209- assert (parent -> coa );
1206+ fr_assert (parent -> coa );
12101207
12111208 request = parent -> coa ;
12121209 request -> packet = talloc_steal (request , packet );
@@ -2210,8 +2207,8 @@ int main(int argc, char **argv)
22102207 }
22112208 }
22122209 } else { /* haven't sent this packet, we're not done */
2213- assert (this -> done == false);
2214- assert (this -> reply == NULL );
2210+ fr_assert (this -> done == false);
2211+ fr_assert (this -> reply == NULL );
22152212 done = false;
22162213 }
22172214 }
0 commit comments