]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Please lint
authorRalph Dolmans <ralph@nlnetlabs.nl>
Wed, 3 Jan 2018 17:05:48 +0000 (17:05 +0000)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Wed, 3 Jan 2018 17:05:48 +0000 (17:05 +0000)
git-svn-id: file:///svn/unbound/trunk@4435 be551aaa-1e26-0410-a405-d3ace91eadb9

iterator/iterator.c
util/configlexer.c

index c6e09be30f1cea6e6541a1063d7aa4d576e32e9d..d95a6e03459680b08a33e0ccda52dbbe162a1e64 100644 (file)
@@ -1377,13 +1377,14 @@ processInitRequest2(struct module_qstate* qstate, struct iter_qstate* iq,
        delname = iq->qchase.qname;
        delnamelen = iq->qchase.qname_len;
        if(iq->refetch_glue) {
+               struct iter_hints_stub* stub;
                if(!iq->dp) {
                        log_err("internal or malloc fail: no dp for refetch");
                        return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
                }
                /* Do not send queries above stub, do not set delname to dp if
                 * this is above stub without stub-first. */
-               struct iter_hints_stub* stub = hints_lookup_stub(
+               stub = hints_lookup_stub(
                        qstate->env->hints, iq->qchase.qname, iq->qchase.qclass,
                        iq->dp);
                if(!stub || !stub->dp->has_parent_side_NS || 
index ca4ac754e157eb96e00c80a82f0b778d571a55ca..b22715731850460266536bdc6cf083bade333f17 100644 (file)
@@ -172,7 +172,7 @@ extern FILE *yyin, *yyout;
        do \
                { \
                /* Undo effects of setting up yytext. */ \
-        yy_size_t yyless_macro_arg = (n); \
+        int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
                *yy_cp = (yy_hold_char); \
                YY_RESTORE_YY_MORE_OFFSET \
@@ -223,7 +223,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-    
+
        /* Whether to try to fill the input buffer when we reach the
         * end of it.
         */
@@ -2587,7 +2587,7 @@ static int input (void );
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               int n; \
+               size_t n; \
                for ( n = 0; n < max_size && \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
@@ -2600,7 +2600,7 @@ static int input (void );
        else \
                { \
                errno=0; \
-               while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+               while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
                        { \
                        if( errno != EINTR) \
                                { \
@@ -4290,7 +4290,7 @@ static int yy_get_next_buffer (void)
 
                                b->yy_ch_buf = (char *)
                                        /* Include room in for 2 EOB chars. */
-                                       yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2)  );
+                                       yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
                                }
                        else
                                /* Can't grow it, we don't own it. */
@@ -4339,7 +4339,7 @@ static int yy_get_next_buffer (void)
        if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
                /* Extend the array by 50%, plus the number we really need. */
                int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size  );
+               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
                if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
                        YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
        }
@@ -4563,12 +4563,12 @@ static void yy_load_buffer_state  (void)
        if ( ! b )
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
-       b->yy_buf_size = size;
+       b->yy_buf_size = (yy_size_t)size;
 
        /* yy_ch_buf has to be 2 characters longer than the size given because
         * we need to put in 2 end-of-buffer characters.
         */
-       b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2)  );
+       b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
        if ( ! b->yy_ch_buf )
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
@@ -4724,9 +4724,9 @@ static void yyensure_buffer_stack (void)
                                                                );
                if ( ! (yy_buffer_stack) )
                        YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-                                                                 
+
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-                               
+
                (yy_buffer_stack_max) = num_to_alloc;
                (yy_buffer_stack_top) = 0;
                return;
@@ -4755,7 +4755,7 @@ static void yyensure_buffer_stack (void)
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
  * 
- * @return the newly allocated buffer state object. 
+ * @return the newly allocated buffer state object.
  */
 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 {
@@ -4771,7 +4771,7 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
        if ( ! b )
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
 
-       b->yy_buf_size = (int) (size - 2);      /* "- 2" to take care of EOB's */
+       b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
        b->yy_buf_pos = b->yy_ch_buf = base;
        b->yy_is_our_buffer = 0;
        b->yy_input_file = NULL;
@@ -4854,7 +4854,7 @@ static void yynoreturn yy_fatal_error (yyconst char* msg )
        do \
                { \
                /* Undo effects of setting up yytext. */ \
-        yy_size_t yyless_macro_arg = (n); \
+        int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
                yytext[yyleng] = (yy_hold_char); \
                (yy_c_buf_p) = yytext + yyless_macro_arg; \
@@ -4871,7 +4871,7 @@ static void yynoreturn yy_fatal_error (yyconst char* msg )
  */
 int yyget_lineno  (void)
 {
-        
+    
     return yylineno;
 }