From a6bf96a0896f42f4a737316d2d0d0ea1d3c0c114 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 31 Mar 2001 23:06:40 +0000 Subject: 2001-03-29 Neal H Walfield * port-deref.c (ports_port_deref): Simplify logic. --- libports/port-deref.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libports/port-deref.c') diff --git a/libports/port-deref.c b/libports/port-deref.c index a1238315..1ded45d9 100644 --- a/libports/port-deref.c +++ b/libports/port-deref.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 2001 Free Software Foundation, Inc. Written by Michael I. Bushnell. This file is part of the GNU Hurd. @@ -32,11 +32,11 @@ ports_port_deref (void *portstruct) mutex_lock (&_ports_lock); - if (pi->refcnt == 1 && pi->weakrefcnt && !trieddroppingweakrefs) + if (pi->refcnt == 1 && pi->weakrefcnt + && pi->class->dropweak_routine && !trieddroppingweakrefs) { mutex_unlock (&_ports_lock); - if (pi->class->dropweak_routine) - (*pi->class->dropweak_routine) (pi); + (*pi->class->dropweak_routine) (pi); trieddroppingweakrefs = 1; goto retry; } -- cgit v1.2.3