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

This commit is contained in:
Andreas Gustafsson 2001-11-27 00:56:32 +00:00
parent 4d1d37a19d
commit f1b6872550
53 changed files with 205 additions and 205 deletions

View file

@ -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);

View file

@ -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]))

View file

@ -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",

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);
}

View file

@ -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)

View file

@ -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]);

View file

@ -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]);

View file

@ -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");

View file

@ -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, "

View file

@ -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);

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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);

View file

@ -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) {

View file

@ -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);

View file

@ -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;

View file

@ -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++) {
ttn2 = &typenames[j];
if (ttn2->sorted != 0)
continue;
@ -723,7 +723,7 @@ main(int argc, char **argv) {
fprintf(stdout, "\tdns_rdatatype_none = 0,\n");
lasttype = 0;
for (tt = types; tt != NULL ; tt = tt->next)
for (tt = types; tt != NULL; tt = tt->next)
if (tt->type != lasttype)
fprintf(stdout,
"\tdns_rdatatype_%s = %d,\n",
@ -741,7 +741,7 @@ main(int argc, char **argv) {
fprintf(stdout, "#define dns_rdatatype_none\t"
"((dns_rdatatype_t)dns_rdatatype_none)\n");
for (tt = types; tt != NULL ; tt = tt->next)
for (tt = types; tt != NULL; tt = tt->next)
if (tt->type != lasttype) {
s = funname(tt->typename, buf1);
fprintf(stdout,
@ -811,7 +811,7 @@ main(int argc, char **argv) {
fclose(fd);
}
}
for (tt = types; tt != NULL ; tt = tt->next) {
for (tt = types; tt != NULL; tt = tt->next) {
sprintf(buf, "%s/%s_%d.h",
tt->dirname, tt->typename, tt->type);
if ((fd = fopen(buf,"r")) != NULL) {
@ -828,7 +828,7 @@ main(int argc, char **argv) {
}
}
} else if (depend) {
for (tt = types; tt != NULL ; tt = tt->next)
for (tt = types; tt != NULL; tt = tt->next)
fprintf(stdout, "%s:\t%s/%s_%d.h\n", file,
tt->dirname, tt->typename, tt->type);
}

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.128 2001/11/12 19:05:20 gson Exp $ */
/* $Id: master.c,v 1.129 2001/11/27 00:55:53 gson Exp $ */
#include <config.h>
@ -1097,7 +1097,7 @@ load(dns_loadctx_t *lctx) {
*
* Find a free name buffer.
*/
for (new_in_use = 0; new_in_use < NBUFS ; new_in_use++)
for (new_in_use = 0; new_in_use < NBUFS; new_in_use++)
if (!ictx->in_use[new_in_use])
break;
INSIST(new_in_use < NBUFS);
@ -1647,7 +1647,7 @@ pushfile(const char *master_file, dns_name_t *origin, dns_loadctx_t *lctx) {
/* Set current domain. */
if (ictx->glue != NULL || ictx->current != NULL) {
for (new_in_use = 0; new_in_use < NBUFS ; new_in_use++)
for (new_in_use = 0; new_in_use < NBUFS; new_in_use++)
if (!new->in_use[new_in_use])
break;
INSIST(new_in_use < NBUFS);

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.c,v 1.196 2001/11/12 19:05:22 gson Exp $ */
/* $Id: message.c,v 1.197 2001/11/27 00:55:55 gson Exp $ */
/***
*** Imports
@ -691,7 +691,7 @@ dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp)
m->from_to_wire = intent;
msginit(m);
for (i = 0 ; i < DNS_SECTION_MAX ; i++)
for (i = 0; i < DNS_SECTION_MAX; i++)
ISC_LIST_INIT(m->sections[i]);
m->mctx = mctx;
@ -785,8 +785,8 @@ findname(dns_name_t **foundname, dns_name_t *target,
{
dns_name_t *curr;
for (curr = ISC_LIST_TAIL(*section) ;
curr != NULL ;
for (curr = ISC_LIST_TAIL(*section);
curr != NULL;
curr = ISC_LIST_PREV(curr, link)) {
if (dns_name_equal(curr, target)) {
if (foundname != NULL)
@ -808,8 +808,8 @@ dns_message_findtype(dns_name_t *name, dns_rdatatype_t type,
REQUIRE(*rdataset == NULL);
}
for (curr = ISC_LIST_TAIL(name->list) ;
curr != NULL ;
for (curr = ISC_LIST_TAIL(name->list);
curr != NULL;
curr = ISC_LIST_PREV(curr, link)) {
if (curr->type == type && curr->covers == covers) {
if (rdataset != NULL)
@ -952,7 +952,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
rdataset = NULL;
rdatalist = NULL;
for (count = 0 ; count < msg->counts[DNS_SECTION_QUESTION] ; count++) {
for (count = 0; count < msg->counts[DNS_SECTION_QUESTION]; count++) {
name = isc_mempool_get(msg->namepool);
if (name == NULL)
return (ISC_R_NOMEMORY);
@ -1121,7 +1121,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
best_effort = ISC_TF(options & DNS_MESSAGEPARSE_BESTEFFORT);
seen_problem = ISC_FALSE;
for (count = 0 ; count < msg->counts[sectionid] ; count++) {
for (count = 0; count < msg->counts[sectionid]; count++) {
int recstart = source->current;
isc_boolean_t skip_name_search, skip_type_search;

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rbt.c,v 1.118 2001/11/13 06:19:55 marka Exp $ */
/* $Id: rbt.c,v 1.119 2001/11/27 00:55:56 gson Exp $ */
/* Principal Authors: DCL */
@ -186,7 +186,7 @@ name_hash(dns_name_t *name) {
nlabels = dns_name_countlabels(name);
hash = 0;
for ( ; nlabels > 0; nlabels--) {
for (; nlabels > 0; nlabels--) {
dns_name_getlabelsequence(name, nlabels - 1, 1, &tname);
hash += dns_name_hash(&tname, ISC_FALSE);
}

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: gpos_27.c,v 1.32 2001/07/16 03:06:05 marka Exp $ */
/* $Id: gpos_27.c,v 1.33 2001/11/27 00:55:58 gson Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
@ -39,7 +39,7 @@ fromtext_gpos(ARGS_FROMTEXT) {
UNUSED(downcase);
UNUSED(callbacks);
for (i = 0; i < 3 ; i++) {
for (i = 0; i < 3; i++) {
RETERR(isc_lex_getmastertoken(lexer, &token,
isc_tokentype_qstring,
ISC_FALSE));
@ -60,7 +60,7 @@ totext_gpos(ARGS_TOTEXT) {
dns_rdata_toregion(rdata, &region);
for (i = 0; i < 3 ; i++) {
for (i = 0; i < 3; i++) {
RETERR(txt_totext(&region, target));
if (i != 2)
RETERR(str_totext(" ", target));
@ -80,7 +80,7 @@ fromwire_gpos(ARGS_FROMWIRE) {
UNUSED(rdclass);
UNUSED(downcase);
for (i = 0 ; i < 3; i++)
for (i = 0; i < 3; i++)
RETERR(txt_fromwire(source, target));
return (ISC_R_SUCCESS);
}

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: hinfo_13.c,v 1.37 2001/07/16 03:06:06 marka Exp $ */
/* $Id: hinfo_13.c,v 1.38 2001/11/27 00:56:00 gson Exp $ */
/*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
@ -39,7 +39,7 @@ fromtext_hinfo(ARGS_FROMTEXT) {
REQUIRE(type == 13);
for (i = 0; i < 2 ; i++) {
for (i = 0; i < 2; i++) {
RETERR(isc_lex_getmastertoken(lexer, &token,
isc_tokentype_qstring,
ISC_FALSE));

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: loc_29.c,v 1.30 2001/07/16 03:06:10 marka Exp $ */
/* $Id: loc_29.c,v 1.31 2001/11/27 00:56:01 gson Exp $ */
/* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */
@ -109,7 +109,7 @@ fromtext_loc(ARGS_FROMTEXT) {
RETTOK(ISC_R_RANGE);
if (*e == '.') {
e++;
for (i = 0; i < 3 ; i++) {
for (i = 0; i < 3; i++) {
if (*e == 0)
break;
if ((tmp = decvalue(*e++)) < 0)
@ -117,7 +117,7 @@ fromtext_loc(ARGS_FROMTEXT) {
s1 *= 10;
s1 += tmp;
}
for ( ; i < 3 ; i++)
for (; i < 3; i++)
s1 *= 10;
if (*e != 0)
RETTOK(DNS_R_SYNTAX);
@ -179,7 +179,7 @@ fromtext_loc(ARGS_FROMTEXT) {
RETTOK(ISC_R_RANGE);
if (*e == '.') {
e++;
for (i = 0; i < 3 ; i++) {
for (i = 0; i < 3; i++) {
if (*e == 0)
break;
if ((tmp = decvalue(*e++)) < 0)
@ -187,7 +187,7 @@ fromtext_loc(ARGS_FROMTEXT) {
s2 *= 10;
s2 += tmp;
}
for ( ; i < 3 ; i++)
for (; i < 3; i++)
s2 *= 10;
if (*e != 0)
RETTOK(DNS_R_SYNTAX);
@ -220,7 +220,7 @@ fromtext_loc(ARGS_FROMTEXT) {
cm = 0;
if (*e == '.') {
e++;
for (i = 0; i < 2 ; i++) {
for (i = 0; i < 2; i++) {
if (*e == 0 || *e == 'm')
break;
if ((tmp = decvalue(*e++)) < 0)
@ -231,7 +231,7 @@ fromtext_loc(ARGS_FROMTEXT) {
else
cm += tmp;
}
for ( ; i < 2 ; i++)
for (; i < 2; i++)
cm *= 10;
}
if (*e == 'm')
@ -267,7 +267,7 @@ fromtext_loc(ARGS_FROMTEXT) {
cm = 0;
if (*e == '.') {
e++;
for (i = 0; i < 2 ; i++) {
for (i = 0; i < 2; i++) {
if (*e == 0 || *e == 'm')
break;
if ((tmp = decvalue(*e++)) < 0)
@ -275,7 +275,7 @@ fromtext_loc(ARGS_FROMTEXT) {
cm *= 10;
cm += tmp;
}
for ( ; i < 2 ; i++)
for (; i < 2; i++)
cm *= 10;
}
if (*e == 'm')
@ -286,7 +286,7 @@ fromtext_loc(ARGS_FROMTEXT) {
* We don't just multiply out as we will overflow.
*/
if (m > 0) {
for (exp = 0 ; exp < 7 ; exp++)
for (exp = 0; exp < 7; exp++)
if (m < poweroften[exp+1])
break;
man = m / poweroften[exp];
@ -320,7 +320,7 @@ fromtext_loc(ARGS_FROMTEXT) {
cm = 0;
if (*e == '.') {
e++;
for (i = 0; i < 2 ; i++) {
for (i = 0; i < 2; i++) {
if (*e == 0 || *e == 'm')
break;
if ((tmp = decvalue(*e++)) < 0)
@ -328,7 +328,7 @@ fromtext_loc(ARGS_FROMTEXT) {
cm *= 10;
cm += tmp;
}
for ( ; i < 2 ; i++)
for (; i < 2; i++)
cm *= 10;
}
if (*e == 'm')
@ -339,7 +339,7 @@ fromtext_loc(ARGS_FROMTEXT) {
* We don't just multiply out as we will overflow.
*/
if (m > 0) {
for (exp = 0 ; exp < 7 ; exp++)
for (exp = 0; exp < 7; exp++)
if (m < poweroften[exp+1])
break;
man = m / poweroften[exp];
@ -371,7 +371,7 @@ fromtext_loc(ARGS_FROMTEXT) {
cm = 0;
if (*e == '.') {
e++;
for (i = 0; i < 2 ; i++) {
for (i = 0; i < 2; i++) {
if (*e == 0 || *e == 'm')
break;
if ((tmp = decvalue(*e++)) < 0)
@ -379,7 +379,7 @@ fromtext_loc(ARGS_FROMTEXT) {
cm *= 10;
cm += tmp;
}
for ( ; i < 2 ; i++)
for (; i < 2; i++)
cm *= 10;
}
if (*e == 'm')
@ -390,7 +390,7 @@ fromtext_loc(ARGS_FROMTEXT) {
* We don't just multiply out as we will overflow.
*/
if (m > 0) {
for (exp = 0 ; exp < 7 ; exp++)
for (exp = 0; exp < 7; exp++)
if (m < poweroften[exp+1])
break;
man = m / poweroften[exp];

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: minfo_14.c,v 1.40 2001/07/16 03:06:17 marka Exp $ */
/* $Id: minfo_14.c,v 1.41 2001/11/27 00:56:02 gson Exp $ */
/* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */
@ -37,7 +37,7 @@ fromtext_minfo(ARGS_FROMTEXT) {
UNUSED(rdclass);
UNUSED(callbacks);
for (i = 0; i < 2 ; i++) {
for (i = 0; i < 2; i++) {
RETERR(isc_lex_getmastertoken(lexer, &token,
isc_tokentype_string,
ISC_FALSE));

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nxt_30.c,v 1.49 2001/07/16 03:06:23 marka Exp $ */
/* $Id: nxt_30.c,v 1.50 2001/11/27 00:56:04 gson Exp $ */
/* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */
@ -106,7 +106,7 @@ totext_nxt(ARGS_TOTEXT) {
sub = name_prefix(&name, tctx->origin, &prefix);
RETERR(dns_name_totext(&prefix, sub, target));
for (i = 0 ; i < sr.length ; i++) {
for (i = 0; i < sr.length; i++) {
if (sr.base[i] != 0)
for (j = 0; j < 8; j++)
if ((sr.base[i] & (0x80 >> j)) != 0) {

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rp_17.c,v 1.35 2001/07/16 03:06:27 marka Exp $ */
/* $Id: rp_17.c,v 1.36 2001/11/27 00:56:05 gson Exp $ */
/* RFC 1183 */
@ -39,7 +39,7 @@ fromtext_rp(ARGS_FROMTEXT) {
origin = (origin != NULL) ? origin : dns_rootname;
for (i = 0; i < 2 ; i++) {
for (i = 0; i < 2; i++) {
RETERR(isc_lex_getmastertoken(lexer, &token,
isc_tokentype_string,
ISC_FALSE));

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: soa_6.c,v 1.53 2001/07/30 01:09:10 marka Exp $ */
/* $Id: soa_6.c,v 1.54 2001/11/27 00:56:06 gson Exp $ */
/* Reviewed: Thu Mar 16 15:18:32 PST 2000 by explorer */
@ -40,7 +40,7 @@ fromtext_soa(ARGS_FROMTEXT) {
origin = (origin != NULL) ? origin : dns_rootname;
for (i = 0 ; i < 2 ; i++) {
for (i = 0; i < 2; i++) {
RETERR(isc_lex_getmastertoken(lexer, &token,
isc_tokentype_string,
ISC_FALSE));
@ -111,7 +111,7 @@ totext_soa(ARGS_TOTEXT) {
RETERR(str_totext(" (" , target));
RETERR(str_totext(tctx->linebreak, target));
for (i = 0; i < 5 ; i++) {
for (i = 0; i < 5; i++) {
char buf[sizeof "2147483647"];
unsigned long num;
unsigned int numlen;

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: wks_11.c,v 1.44 2001/07/16 03:06:51 marka Exp $ */
/* $Id: wks_11.c,v 1.45 2001/11/27 00:56:07 gson Exp $ */
/* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */
@ -158,9 +158,9 @@ totext_in_wks(ARGS_TOTEXT) {
RETERR(str_totext(buf, target));
isc_region_consume(&sr, 1);
for (i = 0 ; i < sr.length ; i++) {
for (i = 0; i < sr.length; i++) {
if (sr.base[i] != 0)
for (j = 0 ; j < 8 ; j++)
for (j = 0; j < 8; j++)
if ((sr.base[i] & (0x80 >> j)) != 0) {
sprintf(buf, "%u", i * 8 + j);
RETERR(str_totext(" ", target));

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: time.c,v 1.20 2001/11/12 19:05:33 gson Exp $ */
/* $Id: time.c,v 1.21 2001/11/27 00:55:57 gson Exp $ */
#include <config.h>
@ -145,7 +145,7 @@ dns_time64_fromtext(const char *source, isc_int64_t *target) {
* Calulate seconds since epoch.
*/
value = second + (60 * minute) + (3600 * hour) + ((day - 1) * 86400);
for (i = 0; i < (month - 1) ; i++)
for (i = 0; i < (month - 1); i++)
value += days[i] * 86400;
if (is_leap(year) && month > 2)
value += 86400;

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: base64.c,v 1.23 2001/03/22 00:07:04 bwelling Exp $ */
/* $Id: base64.c,v 1.24 2001/11/27 00:56:08 gson Exp $ */
#include <config.h>
@ -180,7 +180,7 @@ isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
if (token.type != isc_tokentype_string)
break;
tr = &token.value.as_textregion;
for (i = 0 ;i < tr->length; i++)
for (i = 0;i < tr->length; i++)
RETERR(base64_decode_char(&ctx, tr->base[i]));
}
if (ctx.length < 0 && !ctx.seen_end)

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.5 2001/09/05 22:32:08 bwelling Exp $ */
/* $Id: entropy.c,v 1.6 2001/11/27 00:56:09 gson Exp $ */
/*
* This is the system independent part of the entropy module. It is
@ -320,7 +320,7 @@ entropypool_adddata(isc_entropy_t *ent, void *p, unsigned int len,
entropypool_add_word(&ent->pool, val);
}
for (; len > 3 ; len -= 4) {
for (; len > 3; len -= 4) {
val = *((isc_uint32_t *)buf);
entropypool_add_word(&ent->pool, val);
@ -438,10 +438,10 @@ crunchsamples(isc_entropy_t *ent, sample_queue_t *sq) {
* Prime the values by adding in the first 4 samples in. This
* should completely initialize the delta calculations.
*/
for (ns = 0 ; ns < 4 ; ns++)
for (ns = 0; ns < 4; ns++)
(void)estimate_entropy(sq, sq->samples[ns]);
for (ns = 4 ; ns < sq->nsamples ; ns++)
for (ns = 4; ns < sq->nsamples; ns++)
added += estimate_entropy(sq, sq->samples[ns]);
entropypool_adddata(ent, sq->samples, sq->nsamples * 4, added);
@ -451,7 +451,7 @@ crunchsamples(isc_entropy_t *ent, sample_queue_t *sq) {
* Move the last 4 samples into the first 4 positions, and start
* adding new samples from that point.
*/
for (ns = 0 ; ns < 4 ; ns++) {
for (ns = 0; ns < 4; ns++) {
sq->samples[ns] = sq->samples[sq->nsamples - 4 + ns];
sq->extra[ns] = sq->extra[sq->nsamples - 4 + ns];
}

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: hex.c,v 1.8 2001/03/22 00:07:05 bwelling Exp $ */
/* $Id: hex.c,v 1.9 2001/11/27 00:56:10 gson Exp $ */
#include <config.h>
@ -144,7 +144,7 @@ isc_hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
if (token.type != isc_tokentype_string)
break;
tr = &token.value.as_textregion;
for (i = 0 ;i < tr->length; i++)
for (i = 0;i < tr->length; i++)
RETERR(hex_decode_char(&ctx, tr->base[i]));
}
RETERR(hex_decode_finish(&ctx));

View file

@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
static char rcsid[] = "$Id: inet_aton.c,v 1.15 2001/01/09 21:56:06 bwelling Exp $";
static char rcsid[] = "$Id: inet_aton.c,v 1.16 2001/11/27 00:56:11 gson Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
@ -113,7 +113,7 @@ isc_net_aton(const char *cp, struct in_addr *addr) {
base = 16, c = *++cp;
else {
base = 8;
digit = 1 ;
digit = 1;
}
}
for (;;) {

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lfsr.c,v 1.11 2001/01/09 21:56:11 bwelling Exp $ */
/* $Id: lfsr.c,v 1.12 2001/11/27 00:56:12 gson Exp $ */
#include <config.h>
@ -98,7 +98,7 @@ isc_lfsr_generate(isc_lfsr_t *lfsr, void *data, unsigned int count)
while (byte--) {
*p = 0;
for (bit = 0 ; bit < 7 ; bit++) {
for (bit = 0; bit < 7; bit++) {
*p |= lfsr_generate(lfsr);
*p <<= 1;
}

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mem.c,v 1.106 2001/10/19 01:29:09 gson Exp $ */
/* $Id: mem.c,v 1.107 2001/11/27 00:56:14 gson Exp $ */
#include <config.h>
@ -224,7 +224,7 @@ add_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size
while (dl != NULL) {
if (dl->count == DEBUGLIST_COUNT)
goto next;
for (i = 0 ; i < DEBUGLIST_COUNT ; i++) {
for (i = 0; i < DEBUGLIST_COUNT; i++) {
if (dl->ptr[i] == NULL) {
dl->ptr[i] = ptr;
dl->file[i] = file;
@ -241,7 +241,7 @@ add_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size
INSIST(dl != NULL);
ISC_LINK_INIT(dl, link);
for (i = 1 ; i < DEBUGLIST_COUNT ; i++) {
for (i = 1; i < DEBUGLIST_COUNT; i++) {
dl->ptr[i] = NULL;
dl->file[i] = NULL;
dl->line[i] = 0;
@ -277,7 +277,7 @@ delete_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size,
dl = ISC_LIST_HEAD(mctx->debuglist[size]);
while (dl != NULL) {
for (i = 0 ; i < DEBUGLIST_COUNT ; i++) {
for (i = 0; i < DEBUGLIST_COUNT; i++) {
if (dl->ptr[i] == ptr) {
dl->ptr[i] = NULL;
dl->file[i] = NULL;
@ -1105,7 +1105,7 @@ print_active(isc_mem_t *mctx, FILE *out) {
found = ISC_TRUE;
while (dl != NULL) {
for (j = 0 ; j < DEBUGLIST_COUNT ; j++)
for (j = 0; j < DEBUGLIST_COUNT; j++)
if (dl->ptr[j] != NULL)
fprintf(out, format,
dl->ptr[j], dl->file[j],
@ -1538,7 +1538,7 @@ isc__mempool_get(isc_mempool_t *mpctx FLARG) {
* fill up our free list.
*/
LOCK(&mctx->lock);
for (i = 0 ; i < mpctx->fillcount ; i++) {
for (i = 0; i < mpctx->fillcount; i++) {
#if ISC_MEM_USE_INTERNAL_MALLOC
item = mem_getunlocked(mctx, mpctx->size);
#else /* ISC_MEM_USE_INTERNAL_MALLOC */

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mutexblock.c,v 1.14 2001/01/09 21:56:17 bwelling Exp $ */
/* $Id: mutexblock.c,v 1.15 2001/11/27 00:56:15 gson Exp $ */
#include <config.h>
@ -27,7 +27,7 @@ isc_mutexblock_init(isc_mutex_t *block, unsigned int count) {
isc_result_t result;
unsigned int i;
for (i = 0 ; i < count ; i++) {
for (i = 0; i < count; i++) {
result = isc_mutex_init(&block[i]);
if (result != ISC_R_SUCCESS) {
i--;
@ -47,7 +47,7 @@ isc_mutexblock_destroy(isc_mutex_t *block, unsigned int count) {
isc_result_t result;
unsigned int i;
for (i = 0 ; i < count ; i++) {
for (i = 0; i < count; i++) {
result = isc_mutex_destroy(&block[i]);
if (result != ISC_R_SUCCESS)
return (result);

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: sha1.c,v 1.10 2001/01/09 21:56:28 bwelling Exp $ */
/* $Id: sha1.c,v 1.11 2001/11/27 00:56:16 gson Exp $ */
/* $NetBSD: sha1.c,v 1.5 2000/01/22 22:19:14 mycroft Exp $ */
/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */
@ -183,7 +183,7 @@ isc_sha1_update(isc_sha1_t *context, const unsigned char *data,
if ((j + len) > 63) {
(void)memcpy(&context->buffer[j], data, (i = 64 - j));
transform(context->state, context->buffer);
for ( ; i + 63 < len; i += 64)
for (; i + 63 < len; i += 64)
transform(context->state, &data[i]);
j = 0;
} else {

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.61 2001/08/31 05:57:49 marka Exp $ */
/* $Id: entropy.c,v 1.62 2001/11/27 00:56:17 gson Exp $ */
/*
* This is the system depenedent part of the ISC entropy API.
@ -166,7 +166,7 @@ fillpool(isc_entropy_t *ent, unsigned int desired, isc_boolean_t blocking) {
}
source = ent->nextsource;
again_file:
for (nsource = 0 ; nsource < ent->nsources ; nsource++) {
for (nsource = 0; nsource < ent->nsources; nsource++) {
unsigned int got;
if (remaining == 0)

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.213 2001/11/09 00:37:10 marka Exp $ */
/* $Id: socket.c,v 1.214 2001/11/27 00:56:19 gson Exp $ */
#include <config.h>
@ -849,7 +849,7 @@ dump_msg(struct msghdr *msg) {
printf("MSGHDR %p\n", msg);
printf("\tname %p, namelen %d\n", msg->msg_name, msg->msg_namelen);
printf("\tiov %p, iovlen %d\n", msg->msg_iov, msg->msg_iovlen);
for (i = 0 ; i < (unsigned int)msg->msg_iovlen ; i++)
for (i = 0; i < (unsigned int)msg->msg_iovlen; i++)
printf("\t\t%d\tbase %p, len %d\n", i,
msg->msg_iov[i].iov_base,
msg->msg_iov[i].iov_len);
@ -1991,7 +1991,7 @@ process_fds(isc_socketmgr_t *manager, int maxfd,
* Process read/writes on other fds here. Avoid locking
* and unlocking twice if both reads and writes are possible.
*/
for (i = 0 ; i < maxfd ; i++) {
for (i = 0; i < maxfd; i++) {
#ifdef ISC_PLATFORM_USETHREADS
if (i == manager->pipe_fds[0] || i == manager->pipe_fds[1])
continue;
@ -2344,7 +2344,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
(void)isc_condition_destroy(&manager->shutdown_ok);
#endif /* ISC_PLATFORM_USETHREADS */
for (i = 0 ; i < FD_SETSIZE ; i++)
for (i = 0; i < FD_SETSIZE; i++)
if (manager->fdstate[i] == CLOSE_PENDING)
close(i);

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: syslog.c,v 1.1 2001/03/02 19:25:18 bwelling Exp $ */
/* $Id: syslog.c,v 1.2 2001/11/27 00:56:20 gson Exp $ */
#include <config.h>
@ -71,7 +71,7 @@ isc_syslog_facilityfromstring(const char *str, int *facilityp) {
REQUIRE(str != NULL);
REQUIRE(facilityp != NULL);
for (i = 0 ; facilities[i].strval != NULL ; i++) {
for (i = 0; facilities[i].strval != NULL; i++) {
if (strcasecmp(facilities[i].strval, str) == 0) {
*facilityp = facilities[i].val;
return (ISC_R_SUCCESS);

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.3 2001/07/08 05:08:57 mayer Exp $ */
/* $Id: entropy.c,v 1.4 2001/11/27 00:56:21 gson Exp $ */
/*
* This is the system depenedent part of the ISC entropy API.
@ -157,7 +157,7 @@ fillpool(isc_entropy_t *ent, unsigned int desired, isc_boolean_t blocking) {
*/
firstsource = source;
again_file:
for (nsource = 0 ; nsource < ent->nsources ; nsource++) {
for (nsource = 0; nsource < ent->nsources; nsource++) {
unsigned int got;
if (remaining == 0)

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: net.h,v 1.15 2001/07/16 03:52:13 mayer Exp $ */
/* $Id: net.h,v 1.16 2001/11/27 00:56:25 gson Exp $ */
#ifndef ISC_NET_H
#define ISC_NET_H 1
@ -133,7 +133,7 @@ typedef isc_uint16_t in_port_t;
#undef FD_CLR
#define FD_CLR(fd, set) do { \
u_int __i; \
for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \
for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count; __i++) { \
if (((fd_set FAR *)(set))->fd_array[__i] == (SOCKET) fd) { \
while (__i < ((fd_set FAR *)(set))->fd_count-1) { \
((fd_set FAR *)(set))->fd_array[__i] = \

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.9 2001/11/15 19:06:04 gson Exp $ */
/* $Id: socket.c,v 1.10 2001/11/27 00:56:23 gson Exp $ */
#define MAKE_EXTERNAL 1
@ -961,7 +961,7 @@ dump_msg(struct msghdr *msg, isc_socket_t *sock) {
printf("MSGHDR %p, Socket #: %d\n", msg, sock->fd);
printf("\tname %p, namelen %d\n", msg->msg_name, msg->msg_namelen);
printf("\tiov %p, iovlen %d\n", msg->msg_iov, msg->msg_iovlen);
for (i = 0 ; i < (unsigned int)msg->msg_iovlen ; i++)
for (i = 0; i < (unsigned int)msg->msg_iovlen; i++)
printf("\t\t%d\tbase %p, len %d\n", i,
msg->msg_iov[i].buf,
msg->msg_iov[i].len);
@ -2082,7 +2082,7 @@ process_fds(isc_socketmgr_t *manager, int maxfd,
* Process read/writes on other fds here. Avoid locking
* and unlocking twice if both reads and writes are possible.
*/
for (i = 0 ; i < maxfd ; i++) {
for (i = 0; i < maxfd; i++) {
if (manager->fdstate[i] == CLOSE_PENDING) {
manager->fdstate[i] = CLOSED;
FD_CLR(i, &manager->read_fds);
@ -2436,7 +2436,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
(void)isc_condition_destroy(&manager->shutdown_ok);
#endif /* ISC_PLATFORM_USETHREADS */
for (i = 0 ; i < FD_SETSIZE ; i++)
for (i = 0; i < FD_SETSIZE; i++)
if (manager->fdstate[i] == CLOSE_PENDING)
closesocket(i);

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: syslog.c,v 1.3 2001/07/09 21:06:19 gson Exp $ */
/* $Id: syslog.c,v 1.4 2001/11/27 00:56:24 gson Exp $ */
#include <config.h>
@ -78,7 +78,7 @@ isc_syslog_facilityfromstring(const char *str, int *facilityp) {
REQUIRE(str != NULL);
REQUIRE(facilityp != NULL);
for (i = 0 ; facilities[i].strval != NULL ; i++) {
for (i = 0; facilities[i].strval != NULL; i++) {
if (strcasecmp(facilities[i].strval, str) == 0) {
*facilityp = facilities[i].val;
return (ISC_R_SUCCESS);

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getipnode.c,v 1.30 2001/07/18 02:37:08 mayer Exp $ */
/* $Id: getipnode.c,v 1.31 2001/11/27 00:56:26 gson Exp $ */
#include <config.h>
@ -721,7 +721,7 @@ hostfromaddr(lwres_gnbaresponse_t *addr, int af, const void *src) {
he->h_aliases = malloc(sizeof(char *) * (addr->naliases + 1));
if (he->h_aliases == NULL)
goto cleanup;
for (i = 0 ; i < addr->naliases; i++) {
for (i = 0; i < addr->naliases; i++) {
he->h_aliases[i] = strdup(addr->aliases[i]);
if (he->h_aliases[i] == NULL)
goto cleanup;
@ -796,7 +796,7 @@ hostfromname(lwres_gabnresponse_t *name, int af) {
* Copy aliases.
*/
he->h_aliases = malloc(sizeof(char *) * (name->naliases + 1));
for (i = 0 ; i < name->naliases; i++) {
for (i = 0; i < name->naliases; i++) {
he->h_aliases[i] = strdup(name->aliases[i]);
if (he->h_aliases[i] == NULL)
goto cleanup;

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwconfig.c,v 1.33 2001/07/10 18:25:45 gson Exp $ */
/* $Id: lwconfig.c,v 1.34 2001/11/27 00:56:27 gson Exp $ */
/***
*** Module for parsing resolv.conf files.
@ -220,13 +220,13 @@ lwres_conf_init(lwres_context_t *ctx) {
confdata->ndots = 1;
confdata->no_tld_query = 0;
for (i = 0 ; i < LWRES_CONFMAXNAMESERVERS ; i++)
for (i = 0; i < LWRES_CONFMAXNAMESERVERS; i++)
lwres_resetaddr(&confdata->nameservers[i]);
for (i = 0 ; i < LWRES_CONFMAXSEARCH ; i++)
for (i = 0; i < LWRES_CONFMAXSEARCH; i++)
confdata->search[i] = NULL;
for (i = 0 ; i < LWRES_CONFMAXSORTLIST ; i++) {
for (i = 0; i < LWRES_CONFMAXSORTLIST; i++) {
lwres_resetaddr(&confdata->sortlist[i].addr);
lwres_resetaddr(&confdata->sortlist[i].mask);
}
@ -240,7 +240,7 @@ lwres_conf_clear(lwres_context_t *ctx) {
REQUIRE(ctx != NULL);
confdata = &ctx->confdata;
for (i = 0 ; i < confdata->nsnext ; i++)
for (i = 0; i < confdata->nsnext; i++)
lwres_resetaddr(&confdata->nameservers[i]);
if (confdata->domainname != NULL) {
@ -249,7 +249,7 @@ lwres_conf_clear(lwres_context_t *ctx) {
confdata->domainname = NULL;
}
for (i = 0 ; i < confdata->searchnxt ; i++) {
for (i = 0; i < confdata->searchnxt; i++) {
if (confdata->search[i] != NULL) {
CTXFREE(confdata->search[i],
strlen(confdata->search[i]) + 1);
@ -257,7 +257,7 @@ lwres_conf_clear(lwres_context_t *ctx) {
}
}
for (i = 0 ; i < LWRES_CONFMAXSORTLIST ; i++) {
for (i = 0; i < LWRES_CONFMAXSORTLIST; i++) {
lwres_resetaddr(&confdata->sortlist[i].addr);
lwres_resetaddr(&confdata->sortlist[i].mask);
}
@ -352,7 +352,7 @@ lwres_conf_parsedomain(lwres_context_t *ctx, FILE *fp) {
/*
* Search and domain are mutually exclusive.
*/
for (i = 0 ; i < LWRES_CONFMAXSEARCH ; i++) {
for (i = 0; i < LWRES_CONFMAXSEARCH; i++) {
if (confdata->search[i] != NULL) {
CTXFREE(confdata->search[i],
strlen(confdata->search[i])+1);
@ -389,7 +389,7 @@ lwres_conf_parsesearch(lwres_context_t *ctx, FILE *fp) {
/*
* Remove any previous search definitions.
*/
for (idx = 0 ; idx < LWRES_CONFMAXSEARCH ; idx++) {
for (idx = 0; idx < LWRES_CONFMAXSEARCH; idx++) {
if (confdata->search[idx] != NULL) {
CTXFREE(confdata->search[idx],
strlen(confdata->search[idx])+1);
@ -614,7 +614,7 @@ lwres_conf_print(lwres_context_t *ctx, FILE *fp) {
REQUIRE(confdata->nsnext <= LWRES_CONFMAXNAMESERVERS);
for (i = 0 ; i < confdata->nsnext ; i++) {
for (i = 0; i < confdata->nsnext; i++) {
af = lwresaddr2af(confdata->nameservers[i].family);
p = lwres_net_ntop(af, confdata->nameservers[i].address,
@ -625,7 +625,7 @@ lwres_conf_print(lwres_context_t *ctx, FILE *fp) {
fprintf(fp, "nameserver %s\n", tmp);
}
for (i = 0 ; i < confdata->lwnext ; i++) {
for (i = 0; i < confdata->lwnext; i++) {
af = lwresaddr2af(confdata->lwservers[i].family);
p = lwres_net_ntop(af, confdata->lwservers[i].address,
@ -642,7 +642,7 @@ lwres_conf_print(lwres_context_t *ctx, FILE *fp) {
REQUIRE(confdata->searchnxt <= LWRES_CONFMAXSEARCH);
fprintf(fp, "search");
for (i = 0 ; i < confdata->searchnxt ; i++)
for (i = 0; i < confdata->searchnxt; i++)
fprintf(fp, " %s", confdata->search[i]);
fputc('\n', fp);
}
@ -651,7 +651,7 @@ lwres_conf_print(lwres_context_t *ctx, FILE *fp) {
if (confdata->sortlistnxt > 0) {
fputs("sortlist", fp);
for (i = 0 ; i < confdata->sortlistnxt ; i++) {
for (i = 0; i < confdata->sortlistnxt; i++) {
af = lwresaddr2af(confdata->sortlist[i].addr.family);
p = lwres_net_ntop(af,

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwres_gabn.c,v 1.27 2001/05/29 23:02:52 bwelling Exp $ */
/* $Id: lwres_gabn.c,v 1.28 2001/11/27 00:56:29 gson Exp $ */
#include <config.h>
@ -120,7 +120,7 @@ lwres_gabnresponse_render(lwres_context_t *ctx, lwres_gabnresponse_t *req,
/* real name encoding */
payload_length += 2 + req->realnamelen + 1;
/* each alias */
for (x = 0 ; x < req->naliases ; x++)
for (x = 0; x < req->naliases; x++)
payload_length += 2 + req->aliaslen[x] + 1;
/* each address */
x = 0;
@ -172,7 +172,7 @@ lwres_gabnresponse_render(lwres_context_t *ctx, lwres_gabnresponse_t *req,
lwres_buffer_putuint8(b, 0);
/* encode the aliases */
for (x = 0 ; x < req->naliases ; x++) {
for (x = 0; x < req->naliases; x++) {
datalen = req->aliaslen[x];
lwres_buffer_putuint16(b, datalen);
lwres_buffer_putmem(b, (unsigned char *)req->aliases[x],
@ -303,7 +303,7 @@ lwres_gabnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b,
}
}
for (x = 0 ; x < naddrs ; x++) {
for (x = 0; x < naddrs; x++) {
addr = CTXMALLOC(sizeof(lwres_addr_t));
if (addr == NULL) {
ret = LWRES_R_NOMEMORY;
@ -323,7 +323,7 @@ lwres_gabnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b,
/*
* Parse off the aliases.
*/
for (x = 0 ; x < gabn->naliases ; x++) {
for (x = 0; x < gabn->naliases; x++) {
ret = lwres_string_parse(b, &gabn->aliases[x],
&gabn->aliaslen[x]);
if (ret != LWRES_R_SUCCESS)
@ -335,7 +335,7 @@ lwres_gabnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b,
* up above.
*/
addr = LWRES_LIST_HEAD(addrlist);
for (x = 0 ; x < gabn->naddrs ; x++) {
for (x = 0; x < gabn->naddrs; x++) {
INSIST(addr != NULL);
ret = lwres_addr_parse(b, addr);
if (ret != LWRES_R_SUCCESS)

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwres_gnba.c,v 1.20 2001/01/09 21:59:31 bwelling Exp $ */
/* $Id: lwres_gnba.c,v 1.21 2001/11/27 00:56:30 gson Exp $ */
#include <config.h>
@ -110,7 +110,7 @@ lwres_gnbaresponse_render(lwres_context_t *ctx, lwres_gnbaresponse_t *req,
payload_length = 4; /* flags */
payload_length += 2; /* naliases */
payload_length += 2 + req->realnamelen + 1; /* real name encoding */
for (x = 0 ; x < req->naliases ; x++) /* each alias */
for (x = 0; x < req->naliases; x++) /* each alias */
payload_length += 2 + req->aliaslen[x] + 1;
buflen = LWRES_LWPACKET_LENGTH + payload_length;
@ -146,7 +146,7 @@ lwres_gnbaresponse_render(lwres_context_t *ctx, lwres_gnbaresponse_t *req,
lwres_buffer_putuint8(b, 0);
/* encode the aliases */
for (x = 0 ; x < req->naliases ; x++) {
for (x = 0; x < req->naliases; x++) {
datalen = req->aliaslen[x];
lwres_buffer_putuint16(b, datalen);
lwres_buffer_putmem(b, (unsigned char *)req->aliases[x],
@ -264,7 +264,7 @@ lwres_gnbaresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b,
/*
* Parse off the aliases.
*/
for (x = 0 ; x < gnba->naliases ; x++) {
for (x = 0; x < gnba->naliases; x++) {
ret = lwres_string_parse(b, &gnba->aliases[x],
&gnba->aliaslen[x]);
if (ret != LWRES_R_SUCCESS)

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwres_grbn.c,v 1.4 2001/06/30 04:13:50 mayer Exp $ */
/* $Id: lwres_grbn.c,v 1.5 2001/11/27 00:56:31 gson Exp $ */
#include <config.h>
@ -124,9 +124,9 @@ lwres_grbnresponse_render(lwres_context_t *ctx, lwres_grbnresponse_t *req,
/* real name encoding */
payload_length += 2 + req->realnamelen + 1;
/* each rr */
for (x = 0 ; x < req->nrdatas ; x++)
for (x = 0; x < req->nrdatas; x++)
payload_length += 2 + req->rdatalen[x];
for (x = 0 ; x < req->nsigs ; x++)
for (x = 0; x < req->nsigs; x++)
payload_length += 2 + req->siglen[x];
buflen = LWRES_LWPACKET_LENGTH + payload_length;
@ -171,14 +171,14 @@ lwres_grbnresponse_render(lwres_context_t *ctx, lwres_grbnresponse_t *req,
lwres_buffer_putuint8(b, 0);
/* encode the rdatas */
for (x = 0 ; x < req->nrdatas ; x++) {
for (x = 0; x < req->nrdatas; x++) {
datalen = req->rdatalen[x];
lwres_buffer_putuint16(b, datalen);
lwres_buffer_putmem(b, req->rdatas[x], datalen);
}
/* encode the signatures */
for (x = 0 ; x < req->nsigs ; x++) {
for (x = 0; x < req->nsigs; x++) {
datalen = req->siglen[x];
lwres_buffer_putuint16(b, datalen);
lwres_buffer_putmem(b, req->sigs[x], datalen);
@ -335,7 +335,7 @@ lwres_grbnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b,
/*
* Parse off the rdatas.
*/
for (x = 0 ; x < grbn->nrdatas ; x++) {
for (x = 0; x < grbn->nrdatas; x++) {
ret = lwres_data_parse(b, &grbn->rdatas[x],
&grbn->rdatalen[x]);
if (ret != LWRES_R_SUCCESS)
@ -345,7 +345,7 @@ lwres_grbnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b,
/*
* Parse off the signatures.
*/
for (x = 0 ; x < grbn->nsigs ; x++) {
for (x = 0; x < grbn->nsigs; x++) {
ret = lwres_data_parse(b, &grbn->sigs[x], &grbn->siglen[x]);
if (ret != LWRES_R_SUCCESS)
goto out;

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: net.h,v 1.2 2001/07/18 02:37:14 mayer Exp $ */
/* $Id: net.h,v 1.3 2001/11/27 00:56:32 gson Exp $ */
#ifndef LWRES_NET_H
#define LWRES_NET_H 1
@ -77,7 +77,7 @@
#undef FD_CLR
#define FD_CLR(fd, set) do { \
u_int __i; \
for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \
for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count; __i++) { \
if (((fd_set FAR *)(set))->fd_array[__i] == (SOCKET) fd) { \
while (__i < ((fd_set FAR *)(set))->fd_count-1) { \
((fd_set FAR *)(set))->fd_array[__i] = \