From: Kees van Reeuwijk Date: Wed, 20 Jan 2010 17:02:55 +0000 (+0000) Subject: Removed unused code in the ethernet driver that was left from an old implementation X-Git-Tag: v3.1.6~63 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=9a755c3a1f2b54a3aabe137236d3896b6371cf3a;p=minix.git Removed unused code in the ethernet driver that was left from an old implementation Removed/rewritten the use of uninitialized variables in error messages. --- diff --git a/servers/inet/mnx_eth.c b/servers/inet/mnx_eth.c index 9da1f0ddc..2f9055095 100644 --- a/servers/inet/mnx_eth.c +++ b/servers/inet/mnx_eth.c @@ -145,8 +145,6 @@ PUBLIC void osdep_eth_init() } } - r= ENXIO; - sr_add_minor(if2minor(ecp->ec_ifno, ETH_DEV_OFF), i, eth_open, eth_close, eth_read, eth_write, eth_ioctl, eth_cancel, eth_select); @@ -156,13 +154,6 @@ PUBLIC void osdep_eth_init() eth_port->etp_vlan_port= NULL; eth_port->etp_wr_pack= 0; eth_port->etp_rd_pack= 0; - if (r == OK) - { - eth_port->etp_ethaddr= *(ether_addr_t *)mess.m3_ca1; - printf("osdep_eth_init: setting EPF_GOT_ADDR\n"); - eth_port->etp_flags |= EPF_GOT_ADDR; - setup_read (eth_port); - } } /* And now come the VLANs */ diff --git a/servers/vm/exec.c b/servers/vm/exec.c index 264550cb9..3c92acd7c 100644 --- a/servers/vm/exec.c +++ b/servers/vm/exec.c @@ -281,7 +281,7 @@ SANITYCHECK(SCL_DETAIL); /* We secretly know that making a new pagetable * in the same slot if one was there will never fail. */ - vm_panic("new_mem: pt_new failed", s); + vm_panic("new_mem: pt_new failed", ENOMEM); } rmp->vm_flags |= VMF_HASPT; SANITYCHECK(SCL_DETAIL); diff --git a/servers/vm/i386/pagetable.c b/servers/vm/i386/pagetable.c index f7fe85333..c3d8c0d5e 100644 --- a/servers/vm/i386/pagetable.c +++ b/servers/vm/i386/pagetable.c @@ -328,7 +328,7 @@ PUBLIC void *vm_allocpage(phys_bytes *phys, int reason) if((r=pt_writemap(pt, loc, *phys, I386_PAGE_SIZE, I386_VM_PRESENT | I386_VM_USER | I386_VM_WRITE, 0)) != OK) { FREE_MEM(newpage, CLICKSPERPAGE); - printf("vm_allocpage writemap failed\n", ret); + printf("vm_allocpage writemap failed\n"); level--; return NULL; }