diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-05-25 21:32:26 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-05-25 21:32:26 +0000 |
commit | 31d1dc038bdfc16cc196ee348658695ea2215198 (patch) | |
tree | 946906e4bd2d75047d65ff732fb1f5fd53465705 | |
parent | d529504878d87a1ca1065ffbba4cdf2143204e00 (diff) |
(mom_copy_ref): Omit uses of deleted members of struct mom_port_ref.c
-rw-r--r-- | libmom/copy-ref.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libmom/copy-ref.c b/libmom/copy-ref.c index f0d37954..03d4ab45 100644 --- a/libmom/copy-ref.c +++ b/libmom/copy-ref.c @@ -26,18 +26,9 @@ mom_copy_ref (struct mom_port_ref *new, { error_t err; - new->lock = SPIN_LOCK_INITIALIZER; - - spin_lock (&obj->lock); - assert (obj->refcnt); err = mach_port_mod_refs (mach_task_self (), obj->port, MACH_PORT_RIGHT_SEND, 1); - new->port = obj->port; - spin_unlock (&obj->lock); - - if (err) - return err; - - new->refcnt = 1; - return 0; + if (!err) + new->port = obj->port; + return err; } |