Commit f1b68725 authored by Andreas Gustafsson's avatar Andreas Gustafsson

Do not put a space before ';' when terminating a statement or in a 'for' statement.

parent 4d1d37a1
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.236 2001/11/14 22:08:28 bwelling Exp $ */
/* $Id: dighost.c,v 1.237 2001/11/27 00:55:30 gson Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
......@@ -1571,7 +1571,7 @@ send_tcp_connect(dig_query_t *query) {
INSIST(query->sock == NULL);
result = isc_socket_create(socketmgr,
isc_sockaddr_pf(&query->sockaddr),
isc_sockettype_tcp, &query->sock) ;
isc_sockettype_tcp, &query->sock);
check_result(result, "isc_socket_create");
sockcount++;
debug("sockcount=%d", sockcount);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.21 2001/11/20 18:46:43 gson Exp $ */
/* $Id: config.c,v 1.22 2001/11/27 00:55:32 gson Exp $ */
#include <config.h>
......@@ -178,7 +178,7 @@ isc_result_t
ns_config_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj) {
int i;
for (i = 0; ; i++) {
for (i = 0;; i++) {
if (maps[i] == NULL)
return (ISC_R_NOTFOUND);
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
......@@ -398,7 +398,7 @@ ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
isc_mem_put(mctx, addrs, count * sizeof(isc_sockaddr_t));
if (keys != NULL) {
unsigned int j;
for (j = 0 ; j <= i; j++) {
for (j = 0; j <= i; j++) {
if (keys[j] == NULL)
continue;
if (dns_name_dynamic(keys[j]))
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdclient.c,v 1.14 2001/09/19 23:08:20 gson Exp $ */
/* $Id: lwdclient.c,v 1.15 2001/11/27 00:55:33 gson Exp $ */
#include <config.h>
......@@ -81,7 +81,7 @@ ns_lwdclientmgr_create(ns_lwreslistener_t *listener, unsigned int nclients,
!= ISC_R_SUCCESS)
goto errout;
for (i = 0 ; i < nclients ; i++) {
for (i = 0; i < nclients; i++) {
client = isc_mem_get(lwresd->mctx, sizeof(ns_lwdclient_t));
if (client != NULL) {
ns_lwdclient_log(50, "created client %p, manager %p",
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdgabn.c,v 1.13 2001/01/22 22:12:16 bwelling Exp $ */
/* $Id: lwdgabn.c,v 1.14 2001/11/27 00:55:34 gson Exp $ */
#include <config.h>
......@@ -546,11 +546,11 @@ init_gabn(ns_lwdclient_t *client) {
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
for (i = 0 ; i < LWRES_MAX_ALIASES ; i++) {
for (i = 0; i < LWRES_MAX_ALIASES; i++) {
client->aliases[i] = NULL;
client->aliaslen[i] = 0;
}
for (i = 0 ; i < LWRES_MAX_ADDRS ; i++) {
for (i = 0; i < LWRES_MAX_ADDRS; i++) {
client->addrs[i].family = 0;
client->addrs[i].length = 0;
memset(client->addrs[i].address, 0, LWRES_ADDR_MAXLEN);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdgnba.c,v 1.13 2001/08/08 22:54:19 gson Exp $ */
/* $Id: lwdgnba.c,v 1.14 2001/11/27 00:55:35 gson Exp $ */
#include <config.h>
......@@ -179,11 +179,11 @@ init_gnba(ns_lwdclient_t *client) {
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
for (i = 0 ; i < LWRES_MAX_ALIASES ; i++) {
for (i = 0; i < LWRES_MAX_ALIASES; i++) {
client->aliases[i] = NULL;
client->aliaslen[i] = 0;
}
for (i = 0 ; i < LWRES_MAX_ADDRS ; i++) {
for (i = 0; i < LWRES_MAX_ADDRS; i++) {
client->addrs[i].family = 0;
client->addrs[i].length = 0;
memset(client->addrs[i].address, 0, LWRES_ADDR_MAXLEN);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwresd.c,v 1.37 2001/08/07 01:58:55 marka Exp $ */
/* $Id: lwresd.c,v 1.38 2001/11/27 00:55:36 gson Exp $ */
/*
* Main program for the Lightweight Resolver Daemon.
......@@ -152,7 +152,7 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
if (lwc->nsnext > 0) {
CHECK(buffer_putstr(&b, "\tforwarders {\n"));
for (i = 0 ; i < lwc->nsnext ; i++) {
for (i = 0; i < lwc->nsnext; i++) {
CHECK(lwaddr_sockaddr_fromlwresaddr(
&sa,
&lwc->nameservers[i],
......@@ -173,7 +173,7 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
CHECK(buffer_putstr(&b, "\t\t{\n"));
CHECK(buffer_putstr(&b, "\t\t\tany;\n"));
CHECK(buffer_putstr(&b, "\t\t\t{\n"));
for (i = 0 ; i < lwc->sortlistnxt; i++) {
for (i = 0; i < lwc->sortlistnxt; i++) {
lwres_addr_t *lwaddr = &lwc->sortlist[i].addr;
lwres_addr_t *lwmask = &lwc->sortlist[i].mask;
unsigned int mask;
......@@ -245,7 +245,7 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
if (lwc->lwnext > 0) {
CHECK(buffer_putstr(&b, "\tlisten-on {\n"));
for (i = 0 ; i < lwc->lwnext ; i++) {
for (i = 0; i < lwc->lwnext; i++) {
CHECK(lwaddr_sockaddr_fromlwresaddr(&sa,
&lwc->lwservers[i],
0));
......@@ -599,7 +599,7 @@ listener_startclients(ns_lwreslistener_t *listener) {
* Create the client managers.
*/
result = ISC_R_SUCCESS;
for (i = 0 ; i < NTASKS && result == ISC_R_SUCCESS; i++)
for (i = 0; i < NTASKS && result == ISC_R_SUCCESS; i++)
result = ns_lwdclientmgr_create(listener, NRECVS,
ns_g_taskmgr);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: xfrout.c,v 1.105 2001/10/30 00:55:25 gson Exp $ */
/* $Id: xfrout.c,v 1.106 2001/11/27 00:55:37 gson Exp $ */
#include <config.h>
......@@ -724,7 +724,7 @@ compound_rrstream_first(rrstream_t *rs) {
do {
rrstream_t *curstream = s->components[s->state];
s->result = curstream->methods->first(curstream);
} while (s->result == ISC_R_NOMORE && s->state < 2) ;
} while (s->result == ISC_R_NOMORE && s->state < 2);
return (s->result);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: compress_test.c,v 1.24 2001/01/09 21:40:56 bwelling Exp $ */
/* $Id: compress_test.c,v 1.25 2001/11/27 00:55:39 gson Exp $ */
#include <config.h>
......@@ -158,7 +158,7 @@ test(unsigned int allowed, dns_name_t *name1, dns_name_t *name2,
if (raw) {
unsigned int i;
for (i = 0 ; i < source.used ; /* */ ) {
for (i = 0; i < source.used; /* */ ) {
fprintf(stdout, "%02x",
((unsigned char *)source.base)[i]);
if ((++i % 20) == 0)
......@@ -195,7 +195,7 @@ test(unsigned int allowed, dns_name_t *name1, dns_name_t *name2,
if (raw) {
unsigned int i;
for (i = 0 ; i < target.used ; /* */ ) {
for (i = 0; i < target.used; /* */ ) {
fprintf(stdout, "%02x",
((unsigned char *)target.base)[i]);
if ((++i % 20) == 0)
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy2_test.c,v 1.9 2001/01/09 21:41:00 bwelling Exp $ */
/* $Id: entropy2_test.c,v 1.10 2001/11/27 00:55:40 gson Exp $ */
#include <config.h>
......@@ -38,7 +38,7 @@ hex_dump(const char *msg, void *data, unsigned int length) {
base = data;
printf("DUMP of %d bytes: %s\n\t", length, msg);
for (len = 0 ; len < length ; len++) {
for (len = 0; len < length; len++) {
if (len % 16 == 0 && !first)
printf("\n\t");
printf("%02x ", base[len]);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy_test.c,v 1.16 2001/01/09 21:41:01 bwelling Exp $ */
/* $Id: entropy_test.c,v 1.17 2001/11/27 00:55:41 gson Exp $ */
#include <config.h>
......@@ -36,7 +36,7 @@ hex_dump(const char *msg, void *data, unsigned int length) {
base = data;
printf("DUMP of %d bytes: %s\n\t", length, msg);
for (len = 0 ; len < length ; len++) {
for (len = 0; len < length; len++) {
if (len % 16 == 0 && !first)
printf("\n\t");
printf("%02x ", base[len]);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: hash_test.c,v 1.8 2001/01/09 21:41:07 bwelling Exp $ */
/* $Id: hash_test.c,v 1.9 2001/11/27 00:55:42 gson Exp $ */
#include <config.h>
......@@ -35,9 +35,9 @@ print_digest(char *s, const char *hash, unsigned char *d,
unsigned int i, j;
printf("hash (%s) %s:\n\t", hash, s);
for (i = 0 ; i < words ; i++) {
for (i = 0; i < words; i++) {
printf(" ");
for (j = 0 ; j < 4 ; j++)
for (j = 0; j < 4; j++)
printf("%02x", d[i * 4 + j]);
}
printf("\n");
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lfsr_test.c,v 1.10 2001/01/09 21:41:14 bwelling Exp $ */
/* $Id: lfsr_test.c,v 1.11 2001/11/27 00:55:43 gson Exp $ */
#include <config.h>
......@@ -39,12 +39,12 @@ main(int argc, char **argv) {
* Verify that returned values are reproducable.
*/
isc_lfsr_init(&lfsr1, 0, 32, 0x80000057U, 0, NULL, NULL);
for (i = 0 ; i < 32 ; i++) {
for (i = 0; i < 32; i++) {
isc_lfsr_generate(&lfsr1, &state[i], 4);
printf("lfsr1: state[%2d] = %08x\n", i, state[i]);
}
isc_lfsr_init(&lfsr1, 0, 32, 0x80000057U, 0, NULL, NULL);
for (i = 0 ; i < 32 ; i++) {
for (i = 0; i < 32; i++) {
isc_lfsr_generate(&lfsr1, &temp, 4);
if (state[i] != temp)
printf("lfsr1: state[%2d] = %08x, "
......@@ -56,13 +56,13 @@ main(int argc, char **argv) {
* Now do the same with skipping.
*/
isc_lfsr_init(&lfsr1, 0, 32, 0x80000057U, 0, NULL, NULL);
for (i = 0 ; i < 32 ; i++) {
for (i = 0; i < 32; i++) {
isc_lfsr_generate(&lfsr1, &state[i], 4);
isc_lfsr_skip(&lfsr1, 32);
printf("lfsr1: state[%2d] = %08x\n", i, state[i]);
}
isc_lfsr_init(&lfsr1, 0, 32, 0x80000057U, 0, NULL, NULL);
for (i = 0 ; i < 32 ; i++) {
for (i = 0; i < 32; i++) {
isc_lfsr_generate(&lfsr1, &temp, 4);
isc_lfsr_skip(&lfsr1, 32);
if (state[i] != temp)
......@@ -77,12 +77,12 @@ main(int argc, char **argv) {
* x^16 + x^5 + x^3 + x^2 + 1
*/
isc_lfsr_init(&lfsr2, 0, 16, 0x00008016U, 0, NULL, NULL);
for (i = 0 ; i < 32 ; i++) {
for (i = 0; i < 32; i++) {
isc_lfsr_generate(&lfsr2, &state[i], 4);
printf("lfsr2: state[%2d] = %08x\n", i, state[i]);
}
isc_lfsr_init(&lfsr2, 0, 16, 0x00008016U, 0, NULL, NULL);
for (i = 0 ; i < 32 ; i++) {
for (i = 0; i < 32; i++) {
isc_lfsr_generate(&lfsr2, &temp, 4);
if (state[i] != temp)
printf("lfsr2: state[%2d] = %08x, "
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwres_test.c,v 1.25 2001/01/09 21:41:16 bwelling Exp $ */
/* $Id: lwres_test.c,v 1.26 2001/11/27 00:55:44 gson Exp $ */
#include <config.h>
......@@ -172,11 +172,11 @@ test_gabn(const char *target) {
printf("Returned real name: (%u, %s)\n",
res->realnamelen, res->realname);
printf("%u aliases:\n", res->naliases);
for (i = 0 ; i < res->naliases ; i++)
for (i = 0; i < res->naliases; i++)
printf("\t(%u, %s)\n", res->aliaslen[i], res->aliases[i]);
printf("%u addresses:\n", res->naddrs);
addr = LWRES_LIST_HEAD(res->addrs);
for (i = 0 ; i < res->naddrs ; i++) {
for (i = 0; i < res->naddrs; i++) {
INSIST(addr != NULL);
if (addr->family == LWRES_ADDRTYPE_V4)
......@@ -220,7 +220,7 @@ test_gnba(const char *target, lwres_uint32_t af) {
printf("Returned real name: (%u, %s)\n",
res->realnamelen, res->realname);
printf("%u aliases:\n", res->naliases);
for (i = 0 ; i < res->naliases ; i++)
for (i = 0; i < res->naliases; i++)
printf("\t(%u, %s)\n", res->aliaslen[i], res->aliases[i]);
lwres_gnbaresponse_free(ctx, &res);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: t_mem.c,v 1.9 2001/01/09 21:42:00 bwelling Exp $ */
/* $Id: t_mem.c,v 1.10 2001/11/27 00:55:47 gson Exp $ */
#include <config.h>
......@@ -88,7 +88,7 @@ memtest(void) {
/*
* Allocate MP1_MAXALLOC items from the pool. This is our max.
*/
for (i = 0 ; i < MP1_MAXALLOC ; i++) {
for (i = 0; i < MP1_MAXALLOC; i++) {
items1[i] = isc_mempool_get(mp1);
if (items1[i] == NULL) {
t_info("isc_mempool_get unexpectedly failed\n");
......@@ -110,7 +110,7 @@ memtest(void) {
* the free list (which is our max).
*/
for (i = 0 ; i < 11 ; i++) {
for (i = 0; i < 11; i++) {
isc_mempool_put(mp1, items1[i]);
items1[i] = NULL;
}
......@@ -143,15 +143,15 @@ memtest(void) {
isc_mempool_setfillcount(mp2, 25);
t_info("exercising the memory pool\n");
for (j = 0 ; j < 500000 ; j++) {
for (i = 0 ; i < 50 ; i++) {
for (j = 0; j < 500000; j++) {
for (i = 0; i < 50; i++) {
items2[i] = isc_mempool_get(mp2);
if (items2[i] == NULL) {
t_info("items2[%d] is unexpectedly null\n", i);
++nfails;
}
}
for (i = 0 ; i < 50 ; i++) {
for (i = 0; i < 50; i++) {
isc_mempool_put(mp2, items2[i]);
items2[i] = NULL;
}
......@@ -162,7 +162,7 @@ memtest(void) {
/*
* Free all the other items and blow away this pool.
*/
for (i = 11 ; i < MP1_MAXALLOC ; i++) {
for (i = 11; i < MP1_MAXALLOC; i++) {
isc_mempool_put(mp1, items1[i]);
items1[i] = NULL;
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mempool_test.c,v 1.13 2001/09/06 23:14:39 gson Exp $ */
/* $Id: mempool_test.c,v 1.14 2001/11/27 00:55:45 gson Exp $ */
#include <config.h>
......@@ -61,7 +61,7 @@ main(int argc, char *argv[]) {
/*
* Allocate 30 items from the pool. This is our max.
*/
for (i = 0 ; i < 30 ; i++) {
for (i = 0; i < 30; i++) {
items1[i] = isc_mempool_get(mp1);
RUNTIME_CHECK(items1[i] != NULL);
}
......@@ -77,7 +77,7 @@ main(int argc, char *argv[]) {
* the free list (which is our max).
*/
for (i = 0 ; i < 11 ; i++) {
for (i = 0; i < 11; i++) {
isc_mempool_put(mp1, items1[i]);
items1[i] = NULL;
}
......@@ -93,12 +93,12 @@ main(int argc, char *argv[]) {
*/
isc_mempool_setfreemax(mp2, 25);
isc_mempool_setfillcount(mp2, 25);
for (j = 0 ; j < 5000 ; j++) {
for (i = 0 ; i < 50 ; i++) {
for (j = 0; j < 5000; j++) {
for (i = 0; i < 50; i++) {
items2[i] = isc_mempool_get(mp2);
RUNTIME_CHECK(items2[i] != NULL);
}
for (i = 0 ; i < 50 ; i++) {
for (i = 0; i < 50; i++) {
isc_mempool_put(mp2, items2[i]);
items2[i] = NULL;
}
......@@ -107,7 +107,7 @@ main(int argc, char *argv[]) {
/*
* Free all the other items and blow away this pool.
*/
for (i = 11 ; i < 30 ; i++) {
for (i = 11; i < 30; i++) {
isc_mempool_put(mp1, items1[i]);
items1[i] = NULL;
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: driver.c,v 1.7 2001/01/09 21:42:05 bwelling Exp $ */
/* $Id: driver.c,v 1.8 2001/11/27 00:55:49 gson Exp $ */
#include <config.h>
......@@ -87,7 +87,7 @@ main(int argc, char **argv) {
printf("S:%s:%s\n", SUITENAME, gettime());
n_failed = 0;
for (testno = 0 ; testno < NTESTS ; testno++) {
for (testno = 0; testno < NTESTS; testno++) {
test = &tests[testno];
printf("T:%s:%u:A\n", test->tag, testno + 1);
printf("A:%s\n", test->description);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: netaddr_multicast.c,v 1.8 2001/01/09 21:42:07 bwelling Exp $ */
/* $Id: netaddr_multicast.c,v 1.9 2001/11/27 00:55:50 gson Exp $ */
#include <config.h>
......@@ -86,7 +86,7 @@ netaddr_multicast(void) {
isc_boolean_t tf;
n_fail = 0;
for (i = 0 ; i < NADDRS ; i++) {
for (i = 0; i < NADDRS; i++) {
addr = &addrs[i];
result = to_netaddr(addr, &na);
if (result != ISC_R_SUCCESS) {
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata_test.c,v 1.35 2001/01/09 21:41:34 bwelling Exp $ */
/* $Id: rdata_test.c,v 1.36 2001/11/27 00:55:46 gson Exp $ */
#include <config.h>
......@@ -940,7 +940,7 @@ main(int argc, char *argv[]) {
}
if (raw) {
unsigned int i;
for (i = 0 ; i < rdata.length ; /* */ ) {
for (i = 0; i < rdata.length; /* */ ) {
fprintf(stdout, "%02x", rdata.data[i]);
if ((++i % 20) == 0)
fputs("\n", stdout);
......@@ -976,7 +976,7 @@ main(int argc, char *argv[]) {
if (raw > 2) {
unsigned int i;
fputs("\n", stdout);
for (i = 0 ; i < (unsigned int)len ; /* */ ) {
for (i = 0; i < (unsigned int)len; /* */ ) {
fprintf(stdout, "%02x",
((unsigned char*)wbuf.base)[i + wbuf.current]);
if ((++i % 20) == 0)
......@@ -1015,7 +1015,7 @@ main(int argc, char *argv[]) {
if (raw > 1) {
unsigned int i;
fputs("\n", stdout);
for (i = 0 ; i < rdata.length ; /* */ ) {
for (i = 0; i < rdata.length; /* */ ) {
fprintf(stdout, "%02x", rdata.data[i]);
if ((++i % 20) == 0)
fputs("\n", stdout);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dispatch.c,v 1.103 2001/11/12 19:05:14 gson Exp $ */
/* $Id: dispatch.c,v 1.104 2001/11/27 00:55:51 gson Exp $ */
#include <config.h>
......@@ -1304,7 +1304,7 @@ qid_allocate(dns_dispatchmgr_t *mgr, unsigned int buckets,
return (ISC_R_UNEXPECTED);
}
for (i = 0 ; i < buckets ; i++)
for (i = 0; i < buckets; i++)
ISC_LIST_INIT(qid->qid_table[i]);
qid->qid_nbuckets = buckets;
......@@ -1773,7 +1773,7 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
id = dns_randomid(qid);
bucket = dns_hash(qid, dest, id);
ok = ISC_FALSE;
for (i = 0 ; i < 64 ; i++) {
for (i = 0; i < 64; i++) {
if (bucket_search(qid, dest, id, bucket) == NULL) {
ok = ISC_TRUE;
break;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: gen.c,v 1.66 2001/11/12 19:05:15 gson Exp $ */
/* $Id: gen.c,v 1.67 2001/11/27 00:55:52 gson Exp $ */
#include <config.h>
......@@ -197,7 +197,7 @@ doswitch(const char *name, const char *function, const char *args,
if (res == NULL)
result = "";
for (tt = types; tt != NULL ; tt = tt->next) {
for (tt = types; tt != NULL; tt = tt->next) {
if (first) {
fprintf(stdout, "\n#define %s \\\n", name);
fprintf(stdout, "\tswitch (%s) { \\\n" /*}*/, tsw);
......@@ -260,7 +260,7 @@ dodecl(char *type, char *function, char *args) {
char buf1[11], buf2[11];
fputs("\n", stdout);
for (tt = types; tt ; tt = tt->next)
for (tt = types; tt; tt = tt->next)
if (tt->rdclass)
fprintf(stdout,
"static inline %s %s_%s_%s(%s);\n",
......@@ -469,7 +469,7 @@ main(int argc, char **argv) {
char *file = NULL;
isc_dir_t dir;
for (i = 0 ; i <= 255 ; i++)
for (i = 0; i <= 255; i++)
memset(&typenames[i], 0, sizeof(typenames[i]));
strcpy(srcdir, "");
......@@ -562,7 +562,7 @@ main(int argc, char **argv) {
fputs("#include <isc/result.h>\n\n", stdout);
fputs("#include <dns/name.h>\n\n", stdout);
for (tt = types; tt != NULL ; tt = tt->next)
for (tt = types; tt != NULL; tt = tt->next)
fprintf(stdout, "#include \"%s/%s_%d.c\"\n",
tt->dirname, tt->typename, tt->type);
......@@ -626,7 +626,7 @@ main(int argc, char **argv) {
fprintf(stdout, "\tunsigned int flags;\n");
fprintf(stdout, "} typeattr_t;\n");
fprintf(stdout, "static typeattr_t typeattr[] = {\n");
for (i = 0 ; i <= 255 ; i++) {
for (i = 0; i <= 255; i++) {
ttn = &typenames[i];
if (ttn->typename[0] == 0) {
const char *attrs;
......@@ -650,7 +650,7 @@ main(int argc, char **argv) {
* Run through the list of types and pre-mark the unused
* ones as "sorted" so we simply ignore them below.
*/
for (i = 0 ; i <= 255 ; i++) {
for (i = 0; i <= 255; i++) {
ttn = &typenames[i];
if (ttn->typename[0] == 0)
ttn->sorted = 1;
......@@ -680,7 +680,7 @@ main(int argc, char **argv) {
fprintf(stdout, "#define RDATATYPE_FROMTEXT_SW(_hash,_typename,_typep) "
"\\\n");
fprintf(stdout, "\tswitch (_hash) { \\\n");
for (i = 0 ; i <= 255 ; i++) {
for (i = 0; i <= 255; i++) {
ttn = &typenames[i];
/*
......@@ -696,7 +696,7 @@ main(int argc, char **argv) {
* Find all other entries that happen to match
* this hash.
*/
for (j = 0 ; j <= 255 ; j++) {
for (j = 0; j <= 255; j++) {