Clarify behaviour of plug() by using intf_put() and intf_get().

This commit is contained in:
Michael Brown
2007-05-01 00:06:21 +00:00
parent 7ff81f6654
commit a90a9adbd7
2 changed files with 22 additions and 3 deletions

View File

@@ -38,9 +38,8 @@
* interface into a null interface.
*/
void plug ( struct interface *intf, struct interface *dest ) {
ref_put ( intf->dest->refcnt );
intf->dest = dest;
ref_get ( intf->dest->refcnt );
intf_put ( intf->dest );
intf->dest = intf_get ( dest );
}
/**