Date: Fri, 28 Jul 2006 14:33:51 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102647 for review Message-ID: <200607281433.k6SEXpJg043080@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102647 Change 102647 by piso@piso_newluxor on 2006/07/28 14:33:06 When the list is empty, add the entry at the head. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.c#17 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.c#17 (text+ko) ==== @@ -168,7 +168,7 @@ static int _attach_handler(struct proto_handler *p) { - struct proto_handler *b; + struct proto_handler *b = NULL; LIBALIAS_WLOCK_ASSERT(); LIST_FOREACH(b, &handler_chain, entries) { @@ -182,7 +182,10 @@ } } /* End of list or found right position, inserts here. */ - LIST_INSERT_AFTER(b, p, entries); + if (b) + LIST_INSERT_AFTER(b, p, entries); + else + LIST_INSERT_HEAD(&handler_chain, p, entries); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607281433.k6SEXpJg043080>