From f42c29d2172e953887542bf7fb31d2b739563887 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 27 Sep 2015 18:50:11 +0200 Subject: pfinet: convert to trivfs dynamic classes and buckets libtrivfs contains two ways of managing more than one port class and bucket. There is the old way of using a statically allocated array with explicit length, and the new way with dynamically allocated vectors. Converting all users to the new way of handling multiple classes and/or buckets, we can simplify the code in libtrivfs. In many cases, the code will be simpler and more expressive for the user. This also fixes a mild bug. The classes and buckets given to `trivfs_startup' end up in the dynamic vectors too, making the object lookup code use the more complicated code path. * pfinet/main.c: Convert to dynamic classes and buckets. * pfinet/options.c: Likewise. * pfinet/pfinet.h: Likewise. * pfinet/socket-ops.c: Likewise. --- pfinet/socket-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pfinet/socket-ops.c') diff --git a/pfinet/socket-ops.c b/pfinet/socket-ops.c index 3f8b7fbc..14b3120c 100644 --- a/pfinet/socket-ops.c +++ b/pfinet/socket-ops.c @@ -82,7 +82,7 @@ S_socket_create (struct trivfs_protid *master, isroot = 1; } - if (master->pi.class == trivfs_protid_portclasses[PORTCLASS_INET]) + if (master->pi.class == pfinet_protid_portclasses[PORTCLASS_INET]) err = - (*net_families[PF_INET]->create) (sock, protocol); else err = - (*net_families[PF_INET6]->create) (sock, protocol); -- cgit v1.2.3