mirror of https://github.com/ipxe/ipxe.git
[interface] Avoid unnecessary reference counting in intf_unplug()
The null interface does not have a reference counter, so the call to intf_get() is always redundant. Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/58/merge
parent
941c53a3bf
commit
8ef4e7c572
|
@ -113,7 +113,10 @@ void intf_plug_plug ( struct interface *a, struct interface *b ) {
|
|||
* @v intf Object interface
|
||||
*/
|
||||
void intf_unplug ( struct interface *intf ) {
|
||||
intf_plug ( intf, &null_intf );
|
||||
DBGC ( INTF_COL ( intf ), "INTF " INTF_INTF_FMT " unplug\n",
|
||||
INTF_INTF_DBG ( intf, intf->dest ) );
|
||||
intf_put ( intf->dest );
|
||||
intf->dest = &null_intf;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue