diff options
author | Miles Bader <miles@gnu.org> | 1995-07-08 22:58:47 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-07-08 22:58:47 +0000 |
commit | bafaf013536eef09bee1982e04436c13899febc2 (patch) | |
tree | f6d6432b24f75973012b3f6aa45db1518efd3f57 /libports | |
parent | 4c16d29c5f21b34b55840391f25fe9bf6f2b34f0 (diff) |
(ports_intern_external_port): Properly add PI to CLASS's port list when the
list is empty.
Diffstat (limited to 'libports')
-rw-r--r-- | libports/intern-external-port.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libports/intern-external-port.c b/libports/intern-external-port.c index 49139e7d..c60fc87e 100644 --- a/libports/intern-external-port.c +++ b/libports/intern-external-port.c @@ -72,7 +72,8 @@ void *ports_intern_external_port (struct port_bucket *bucket, assert_perror (err); pi->next = class->ports; pi->prevp = &class->ports; - class->ports->prevp = &pi->next; + if (class->ports) + class->ports->prevp = &pi->next; class->ports = pi; bucket->count++; class->count++; |