diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-06-21 18:46:31 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-06-21 18:46:31 +0000 |
commit | 8d00e803d92d655e0efcfa196b7f4b141190cbbd (patch) | |
tree | 7633c24e26bfccdc2adafe837cd86ac50425d562 | |
parent | e7e4427c97389dcca024610124ec55815ec67f93 (diff) |
(ports_bucket_iterate): Typo
.
-rw-r--r-- | libports/bucket-iterate.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libports/bucket-iterate.c b/libports/bucket-iterate.c index a85b7863..ef020226 100644 --- a/libports/bucket-iterate.c +++ b/libports/bucket-iterate.c @@ -22,9 +22,9 @@ /* This is obsecenely ineffecient. ihash and ports need to cooperate more closely to do it effeciently. */ -void +error_t ports_bucket_iterate (struct port_bucket *bucket, - void (*fun)(void *)) + error_t (*fun)(void *)) { struct item { @@ -32,6 +32,7 @@ ports_bucket_iterate (struct port_bucket *bucket, void *p; } *list = 0; struct item *i, nxt; + error_t err; error_t enqueue (void *pi) { @@ -49,11 +50,14 @@ ports_bucket_iterate (struct port_bucket *bucket, ihash_iterate (bucket->htable, enqueue); mutex_unlock (&_ports_lock); + err = 0; for (i = list; i; i = nxt) { - (*fun)(i->p); + if (!err) + err = (*fun)(i->p); ports_port_deref (i->p); nxt = i->next; free (i); } + return err; } |