reduce scope
authorChristian Grothoff <christian@grothoff.org>
Mon, 25 Jun 2018 18:07:38 +0000 (20:07 +0200)
committerChristian Grothoff <christian@grothoff.org>
Mon, 25 Jun 2018 18:07:38 +0000 (20:07 +0200)
src/util/dnsparser.c

index 55475b1313082db2f0df912dd945bd0183be0031..e8aacd3d74406b4c30175e312e81578b1af3c573 100644 (file)
@@ -1185,7 +1185,6 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
   struct GNUNET_TUN_DnsHeader dns;
   size_t off;
   char tmp[max];
-  unsigned int i;
   int ret;
   int trc;
 
@@ -1203,7 +1202,7 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
 
   off = sizeof (struct GNUNET_TUN_DnsHeader);
   trc = GNUNET_NO;
-  for (i=0;i<p->num_queries;i++)
+  for (unsigned int i=0;i<p->num_queries;i++)
   {
     ret = GNUNET_DNSPARSER_builder_add_query (tmp,
                                              sizeof (tmp),
@@ -1218,7 +1217,7 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
       break;
     }
   }
-  for (i=0;i<p->num_answers;i++)
+  for (unsigned int i=0;i<p->num_answers;i++)
   {
     ret = add_record (tmp,
                      sizeof (tmp),
@@ -1233,7 +1232,7 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
       break;
     }
   }
-  for (i=0;i<p->num_authority_records;i++)
+  for (unsigned int i=0;i<p->num_authority_records;i++)
   {
     ret = add_record (tmp,
                      sizeof (tmp),
@@ -1248,7 +1247,7 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
       break;
     }
   }
-  for (i=0;i<p->num_additional_records;i++)
+  for (unsigned int i=0;i<p->num_additional_records;i++)
   {
     ret = add_record (tmp,
                      sizeof (tmp),