mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 21:38:10 +00:00
Delete unused automatic variables
This commit is contained in:
parent
6211627d95
commit
0fe8b9ccd3
@ -49,7 +49,6 @@ static char copyright[] =
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
struct interface_info *interfaces;
|
struct interface_info *interfaces;
|
||||||
static struct hardware_link *interface_links;
|
|
||||||
|
|
||||||
static void got_one PROTO ((struct interface_info *));
|
static void got_one PROTO ((struct interface_info *));
|
||||||
|
|
||||||
@ -67,8 +66,6 @@ void discover_interfaces ()
|
|||||||
int i;
|
int i;
|
||||||
int sock;
|
int sock;
|
||||||
int address_count = 0;
|
int address_count = 0;
|
||||||
int ifix = 0;
|
|
||||||
struct hardware_link *lp;
|
|
||||||
struct subnet *subnet;
|
struct subnet *subnet;
|
||||||
struct shared_network *share;
|
struct shared_network *share;
|
||||||
struct sockaddr_in *foo;
|
struct sockaddr_in *foo;
|
||||||
@ -323,17 +320,10 @@ void dispatch ()
|
|||||||
|
|
||||||
void dispatch ()
|
void dispatch ()
|
||||||
{
|
{
|
||||||
struct sockaddr_in from;
|
|
||||||
struct hardware hfrom;
|
|
||||||
struct iaddr ifrom;
|
|
||||||
fd_set r, w, x;
|
fd_set r, w, x;
|
||||||
struct interface_info *l;
|
struct interface_info *l;
|
||||||
int max = 0;
|
int max = 0;
|
||||||
int count;
|
int count;
|
||||||
int result;
|
|
||||||
static unsigned char packbuf [4095]; /* Packet input buffer.
|
|
||||||
Must be as large as largest
|
|
||||||
possible MTU. */
|
|
||||||
|
|
||||||
FD_ZERO (&r);
|
FD_ZERO (&r);
|
||||||
FD_ZERO (&w);
|
FD_ZERO (&w);
|
||||||
|
@ -134,7 +134,6 @@ struct host_decl *find_hosts_by_haddr (htype, haddr, hlen)
|
|||||||
int hlen;
|
int hlen;
|
||||||
{
|
{
|
||||||
struct host_decl *foo;
|
struct host_decl *foo;
|
||||||
int i;
|
|
||||||
|
|
||||||
foo = (struct host_decl *)hash_lookup (host_hw_addr_hash,
|
foo = (struct host_decl *)hash_lookup (host_hw_addr_hash,
|
||||||
haddr, hlen);
|
haddr, hlen);
|
||||||
@ -146,7 +145,6 @@ struct host_decl *find_hosts_by_uid (data, len)
|
|||||||
int len;
|
int len;
|
||||||
{
|
{
|
||||||
struct host_decl *foo;
|
struct host_decl *foo;
|
||||||
int i;
|
|
||||||
|
|
||||||
foo = (struct host_decl *)hash_lookup (host_uid_hash, data, len);
|
foo = (struct host_decl *)hash_lookup (host_uid_hash, data, len);
|
||||||
return foo;
|
return foo;
|
||||||
@ -645,7 +643,6 @@ void write_leases ()
|
|||||||
{
|
{
|
||||||
struct lease *l;
|
struct lease *l;
|
||||||
struct shared_network *s;
|
struct shared_network *s;
|
||||||
int i;
|
|
||||||
|
|
||||||
for (s = shared_networks; s; s = s -> next) {
|
for (s = shared_networks; s; s = s -> next) {
|
||||||
for (l = s -> leases; l; l = l -> next) {
|
for (l = s -> leases; l; l = l -> next) {
|
||||||
@ -661,7 +658,6 @@ void dump_subnets ()
|
|||||||
struct lease *l;
|
struct lease *l;
|
||||||
struct shared_network *s;
|
struct shared_network *s;
|
||||||
struct subnet *n;
|
struct subnet *n;
|
||||||
int i;
|
|
||||||
|
|
||||||
for (s = shared_networks; s; s = s -> next) {
|
for (s = shared_networks; s; s = s -> next) {
|
||||||
for (n = subnets; n; n = n -> next_sibling) {
|
for (n = subnets; n; n = n -> next_sibling) {
|
||||||
|
@ -165,8 +165,6 @@ void cons_options (inpacket, outpacket, options, overload)
|
|||||||
int main_buffer_size;
|
int main_buffer_size;
|
||||||
int mainbufix, bufix;
|
int mainbufix, bufix;
|
||||||
int option_size;
|
int option_size;
|
||||||
int result;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* If the client has provided a maximum DHCP message size,
|
/* If the client has provided a maximum DHCP message size,
|
||||||
use that. Otherwise, we use the default MTU size (576 bytes). */
|
use that. Otherwise, we use the default MTU size (576 bytes). */
|
||||||
@ -297,10 +295,6 @@ int store_options (buffer, buflen, options, priority_list, priority_len,
|
|||||||
{
|
{
|
||||||
int bufix = 0;
|
int bufix = 0;
|
||||||
int option_stored [256];
|
int option_stored [256];
|
||||||
int missed = 0;
|
|
||||||
int missed_code = 0;
|
|
||||||
int missed_length = 0;
|
|
||||||
int result;
|
|
||||||
int i;
|
int i;
|
||||||
int ix;
|
int ix;
|
||||||
|
|
||||||
|
@ -61,7 +61,6 @@ int if_register_socket (info, interface)
|
|||||||
{
|
{
|
||||||
struct sockaddr_in name;
|
struct sockaddr_in name;
|
||||||
int sock;
|
int sock;
|
||||||
struct socklist *tmp;
|
|
||||||
int flag;
|
int flag;
|
||||||
static int once = 0;
|
static int once = 0;
|
||||||
|
|
||||||
|
10
dispatch.c
10
dispatch.c
@ -49,7 +49,6 @@ static char copyright[] =
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
struct interface_info *interfaces;
|
struct interface_info *interfaces;
|
||||||
static struct hardware_link *interface_links;
|
|
||||||
|
|
||||||
static void got_one PROTO ((struct interface_info *));
|
static void got_one PROTO ((struct interface_info *));
|
||||||
|
|
||||||
@ -67,8 +66,6 @@ void discover_interfaces ()
|
|||||||
int i;
|
int i;
|
||||||
int sock;
|
int sock;
|
||||||
int address_count = 0;
|
int address_count = 0;
|
||||||
int ifix = 0;
|
|
||||||
struct hardware_link *lp;
|
|
||||||
struct subnet *subnet;
|
struct subnet *subnet;
|
||||||
struct shared_network *share;
|
struct shared_network *share;
|
||||||
struct sockaddr_in *foo;
|
struct sockaddr_in *foo;
|
||||||
@ -323,17 +320,10 @@ void dispatch ()
|
|||||||
|
|
||||||
void dispatch ()
|
void dispatch ()
|
||||||
{
|
{
|
||||||
struct sockaddr_in from;
|
|
||||||
struct hardware hfrom;
|
|
||||||
struct iaddr ifrom;
|
|
||||||
fd_set r, w, x;
|
fd_set r, w, x;
|
||||||
struct interface_info *l;
|
struct interface_info *l;
|
||||||
int max = 0;
|
int max = 0;
|
||||||
int count;
|
int count;
|
||||||
int result;
|
|
||||||
static unsigned char packbuf [4095]; /* Packet input buffer.
|
|
||||||
Must be as large as largest
|
|
||||||
possible MTU. */
|
|
||||||
|
|
||||||
FD_ZERO (&r);
|
FD_ZERO (&r);
|
||||||
FD_ZERO (&w);
|
FD_ZERO (&w);
|
||||||
|
4
memory.c
4
memory.c
@ -134,7 +134,6 @@ struct host_decl *find_hosts_by_haddr (htype, haddr, hlen)
|
|||||||
int hlen;
|
int hlen;
|
||||||
{
|
{
|
||||||
struct host_decl *foo;
|
struct host_decl *foo;
|
||||||
int i;
|
|
||||||
|
|
||||||
foo = (struct host_decl *)hash_lookup (host_hw_addr_hash,
|
foo = (struct host_decl *)hash_lookup (host_hw_addr_hash,
|
||||||
haddr, hlen);
|
haddr, hlen);
|
||||||
@ -146,7 +145,6 @@ struct host_decl *find_hosts_by_uid (data, len)
|
|||||||
int len;
|
int len;
|
||||||
{
|
{
|
||||||
struct host_decl *foo;
|
struct host_decl *foo;
|
||||||
int i;
|
|
||||||
|
|
||||||
foo = (struct host_decl *)hash_lookup (host_uid_hash, data, len);
|
foo = (struct host_decl *)hash_lookup (host_uid_hash, data, len);
|
||||||
return foo;
|
return foo;
|
||||||
@ -645,7 +643,6 @@ void write_leases ()
|
|||||||
{
|
{
|
||||||
struct lease *l;
|
struct lease *l;
|
||||||
struct shared_network *s;
|
struct shared_network *s;
|
||||||
int i;
|
|
||||||
|
|
||||||
for (s = shared_networks; s; s = s -> next) {
|
for (s = shared_networks; s; s = s -> next) {
|
||||||
for (l = s -> leases; l; l = l -> next) {
|
for (l = s -> leases; l; l = l -> next) {
|
||||||
@ -661,7 +658,6 @@ void dump_subnets ()
|
|||||||
struct lease *l;
|
struct lease *l;
|
||||||
struct shared_network *s;
|
struct shared_network *s;
|
||||||
struct subnet *n;
|
struct subnet *n;
|
||||||
int i;
|
|
||||||
|
|
||||||
for (s = shared_networks; s; s = s -> next) {
|
for (s = shared_networks; s; s = s -> next) {
|
||||||
for (n = subnets; n; n = n -> next_sibling) {
|
for (n = subnets; n; n = n -> next_sibling) {
|
||||||
|
@ -165,8 +165,6 @@ void cons_options (inpacket, outpacket, options, overload)
|
|||||||
int main_buffer_size;
|
int main_buffer_size;
|
||||||
int mainbufix, bufix;
|
int mainbufix, bufix;
|
||||||
int option_size;
|
int option_size;
|
||||||
int result;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* If the client has provided a maximum DHCP message size,
|
/* If the client has provided a maximum DHCP message size,
|
||||||
use that. Otherwise, we use the default MTU size (576 bytes). */
|
use that. Otherwise, we use the default MTU size (576 bytes). */
|
||||||
@ -297,10 +295,6 @@ int store_options (buffer, buflen, options, priority_list, priority_len,
|
|||||||
{
|
{
|
||||||
int bufix = 0;
|
int bufix = 0;
|
||||||
int option_stored [256];
|
int option_stored [256];
|
||||||
int missed = 0;
|
|
||||||
int missed_code = 0;
|
|
||||||
int missed_length = 0;
|
|
||||||
int result;
|
|
||||||
int i;
|
int i;
|
||||||
int ix;
|
int ix;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user