]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Please lint by using proper types
authorRalph Dolmans <ralph@nlnetlabs.nl>
Mon, 8 Oct 2018 16:33:04 +0000 (16:33 +0000)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Mon, 8 Oct 2018 16:33:04 +0000 (16:33 +0000)
git-svn-id: file:///svn/unbound/trunk@4939 be551aaa-1e26-0410-a405-d3ace91eadb9

iterator/iter_utils.c
util/config_file.h
util/configparser.c

index ebdc5b7b93fb960a3f7f75a6af9c605c913c6752..cd92bf3b04543fa389e86626689c948167749ad0 100644 (file)
@@ -283,7 +283,7 @@ static int
 iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
        uint8_t* name, size_t namelen, uint16_t qtype, time_t now, 
        struct delegpt* dp, int* best_rtt, struct sock_list* blacklist,
-       int* num_suitable_results)
+       size_t* num_suitable_results)
 {
        int got_it = 0;
        struct delegpt_addr* a;
@@ -323,9 +323,10 @@ rtt_compare(const void* x, const void* y)
 
 /** get RTT for the Nth fastest server */
 static int
-nth_rtt(struct delegpt_addr* result_list, int num_results, int n)
+nth_rtt(struct delegpt_addr* result_list, size_t num_results, size_t n)
 {
-       int rtt_band, i;
+       int rtt_band;
+       size_t i;
        int* rtt_list, *rtt_index;
        
        if(num_results < 1 || n >= num_results) {
@@ -363,8 +364,8 @@ iter_filter_order(struct iter_env* iter_env, struct module_env* env,
        struct delegpt* dp, int* selected_rtt, int open_target, 
        struct sock_list* blacklist, time_t prefetch)
 {
-       int got_num = 0, low_rtt = 0, swap_to_front, rtt_band = RTT_BAND,
-               num_results, nth;
+       int got_num = 0, low_rtt = 0, swap_to_front, rtt_band = RTT_BAND, nth;
+       size_t num_results;
        struct delegpt_addr* a, *n, *prev=NULL;
 
        /* fillup sel_rtt and find best rtt in the bunch */
index 3826963261ccca7cb982e0cfbe5b274de7bb161c..1c5197b9a6caabfa0ba8581d065989adad920793 100644 (file)
@@ -163,7 +163,7 @@ struct config_file {
         * destinations */
        int fast_server_permil;
        /** number of fastest server to select from */
-       int fast_server_num;
+       size_t fast_server_num;
 
        /** automatic interface for incoming messages. Uses ipv6 remapping,
         * and recvmsg/sendmsg ancillary data to detect interfaces, boolean */
index 31ca210a09585cb159b337709b1d348b19a351d1..5bc633a2e5cc64af4eed47f99c5d5b586e1938f3 100644 (file)
@@ -4725,7 +4725,7 @@ yyreduce:
   case 397:
 #line 1977 "./util/configparser.y" /* yacc.c:1646  */
     { 
-               OUTYY(("P(low-rtt option is depricated, use fast-server-num instead)\n"));
+               OUTYY(("P(low-rtt option is deprecated, use fast-server-num instead)\n"));
                free((yyvsp[0].str));
        }
 #line 4732 "util/configparser.c" /* yacc.c:1646  */