--- src/dhcpconfig.c 2005-07-24 12:51:33 +0200 +++ src/dhcpconfig.c 2005-07-24 12:53:34 +0200 @@ -382,8 +382,8 @@ f=fopen(resolv_file, "w"); if ( f ) { - fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); int i; + fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); if ( DhcpOptions.len[dnsSearchPath] ) fprintf(f,"search %s\n",(char *)DhcpOptions.val[dnsSearchPath]); @@ -413,9 +413,9 @@ f=fopen(nis_file, "w"); if ( f ) { - fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); int i; char *prefix=NULL; + fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); if ( DhcpOptions.len[nisDomainName] ) { if ( DhcpOptions.len[nisServers] ) { prefix=(char *)malloc(DhcpOptions.len[nisDomainName] + 15); @@ -447,8 +447,10 @@ f=fopen(ntp_file, "w"); if ( f ) { - fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); int net, mask; + int i; + char addr[4*3+3*1+1]; + fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); memcpy(&mask,DhcpOptions.val[subnetMask],4); net = DhcpIface.ciaddr & mask; @@ -456,17 +458,15 @@ fprintf(f,"restrict default noquery notrust nomodify\n"); fprintf(f,"restrict 127.0.0.1\n"); - int i; - char addr[4*3+3*1+1]; - for (i=0;i