From 4f2663a3fef6c82cbf3d8d33f85e713860bb1f2c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 28 Feb 1999 20:51:52 +0000 Subject: 1999-02-28 Roland McGrath * destroy-right.c (ports_destroy_right): Return error_t (always 0). * ports.h: Update decl. --- libports/destroy-right.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'libports') diff --git a/libports/destroy-right.c b/libports/destroy-right.c index 704c0f57..32085c80 100644 --- a/libports/destroy-right.c +++ b/libports/destroy-right.c @@ -1,5 +1,5 @@ -/* - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* + Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. Written by Michael I. Bushnell. This file is part of the GNU Hurd. @@ -23,12 +23,12 @@ #include #include -void +error_t ports_destroy_right (void *portstruct) { struct port_info *pi = portstruct; error_t err; - + if (pi->port_right != MACH_PORT_NULL) { mutex_lock (&_ports_lock); @@ -37,16 +37,15 @@ ports_destroy_right (void *portstruct) MACH_PORT_RIGHT_RECEIVE, -1); assert_perror (err); mutex_unlock (&_ports_lock); - + pi->port_right = MACH_PORT_NULL; - + if (pi->flags & PORT_HAS_SENDRIGHTS) { pi->flags &= ~PORT_HAS_SENDRIGHTS; ports_port_deref (pi); } } -} - - + return 0; +} -- cgit v1.2.3