From owner-p4-projects@FreeBSD.ORG Thu Jul 6 15:55:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 301D116A4E1; Thu, 6 Jul 2006 15:55:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B168316A4DD for ; Thu, 6 Jul 2006 15:55:46 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C67343D5A for ; Thu, 6 Jul 2006 15:55:46 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k66Ftkaj095082 for ; Thu, 6 Jul 2006 15:55:46 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k66FtktX095079 for perforce@freebsd.org; Thu, 6 Jul 2006 15:55:46 GMT (envelope-from piso@freebsd.org) Date: Thu, 6 Jul 2006 15:55:46 GMT Message-Id: <200607061555.k66FtktX095079@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 100762 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 15:55:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=100762 Change 100762 by piso@piso_newluxor on 2006/07/06 15:55:33 Some more style(9) fixes: indentation, white space and comments. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#8 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.c#15 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#8 (text+ko) ==== @@ -1504,7 +1504,8 @@ while (1) { fgets(buf, 256, fd); - if feof(fd) break; + if feof(fd) + break; len = strlen(buf); if (len > 1) { buf[len - 1] = '\0'; ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.c#15 (text+ko) ==== @@ -61,7 +61,7 @@ #include -/* protocol and userland module handlers chains */ +/* Protocol and userland module handlers chains. */ LIST_HEAD(handler_chain, proto_handler) handler_chain = LIST_HEAD_INITIALIZER(foo); #ifdef _KERNEL struct rwlock handler_rw; @@ -172,15 +172,16 @@ LIBALIAS_WLOCK_ASSERT(); LIST_FOREACH(b, &handler_chain, entries) { - if ((b->pri == p->pri) && (b->dir == p->dir) && - (b->proto == p->proto)) - return (EEXIST); /* priority conflict */ + if ((b->pri == p->pri) && + (b->dir == p->dir) && + (b->proto == p->proto)) + return (EEXIST); /* Priority conflict. */ if (b->pri > p->pri) { LIST_INSERT_BEFORE(b, p, entries); return (0); } } - /* end of list or got right position, insert here */ + /* End of list or found right position, inserts here. */ LIST_INSERT_AFTER(b, p, entries); return (0); } @@ -196,7 +197,7 @@ return (0); } } - return (ENOENT); /* handler not found */ + return (ENOENT); /* Handler not found. */ } int @@ -205,9 +206,11 @@ LIBALIAS_WLOCK(); for (i=0; 1; i++) { - if (*((int *)&_p[i]) == EOH) break; + if (*((int *)&_p[i]) == EOH) + break; error = _attach_handler(&_p[i]); - if (error != 0) break; + if (error != 0) + break; } LIBALIAS_WUNLOCK(); return (error); @@ -219,9 +222,11 @@ LIBALIAS_WLOCK(); for (i=0; 1; i++) { - if (*((int *)&_p[i]) == EOH) break; + if (*((int *)&_p[i]) == EOH) + break; error = _detach_handler(&_p[i]); - if (error != 0) break; + if (error != 0) + break; } LIBALIAS_WUNLOCK(); return (error); @@ -238,7 +243,8 @@ } int -find_handler(int8_t dir, int8_t proto, struct libalias *la, struct ip *pip, struct alias_data *ad) { +find_handler(int8_t dir, int8_t proto, struct libalias *la, struct ip *pip, + struct alias_data *ad) { struct proto_handler *p; int error = ENOENT; @@ -261,7 +267,7 @@ return (LIST_FIRST(&handler_chain)); } -/* dll manipulation code - this code is not thread safe... */ +/* Dll manipulation code - this code is not thread safe... */ int attach_dll(struct dll *p) { @@ -269,9 +275,8 @@ SLIST_FOREACH(b, &dll_chain, next) { if (!strncmp(b->name, p->name, DLL_LEN)) - return (EEXIST); /* dll name conflict */ + return (EEXIST); /* Dll name conflict. */ } - /* end of list, insert here */ SLIST_INSERT_HEAD(&dll_chain, p, next); return (0); }