summaryrefslogtreecommitdiff
path: root/libports/transfer-right.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-03-29 14:34:56 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-03-29 14:34:56 +0000
commit3538ecac80377f828c6bba504e468201ea7ea55b (patch)
tree3c599200d10e955ef56252b11f3591b61880e85a /libports/transfer-right.c
parent349af9302a2ddd0abfde3bb9471bb79f0e4ac6f1 (diff)
(ports_transfer_right):
Diffstat (limited to 'libports/transfer-right.c')
-rw-r--r--libports/transfer-right.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libports/transfer-right.c b/libports/transfer-right.c
index bce54916..d5844ea2 100644
--- a/libports/transfer-right.c
+++ b/libports/transfer-right.c
@@ -32,7 +32,8 @@ ports_transfer_right (void *tostruct,
int dereffrompi = 0;
int dereftopi = 0;
int hassendrights = 0;
-
+ error_t err;
+
mutex_lock (&_ports_lock);
/* Fetch the port in FROMPI and clear its use */
@@ -57,7 +58,7 @@ ports_transfer_right (void *tostruct,
MACH_PORT_RIGHT_RECEIVE, -1);
if ((topi->flags & PORT_HAS_SENDRIGHTS) && !hassendrights)
{
- derreftopi = 1;
+ dereftopi = 1;
topi->flags &= ~PORT_HAS_SENDRIGHTS;
}
else if (((topi->flags & PORT_HAS_SENDRIGHTS) == 0) && hassendrights)
@@ -82,10 +83,11 @@ ports_transfer_right (void *tostruct,
mutex_unlock (&_ports_lock);
/* Take care of any lowered reference counts. */
- if (derreffrompi)
+ if (dereffrompi)
ports_port_deref (frompi);
- if (derreftopi)
+ if (dereftopi)
ports_port_deref (topi);
+ return 0;
}