From owner-svn-src-projects@FreeBSD.ORG Mon Jun 29 16:55:58 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15BCA1065674; Mon, 29 Jun 2009 16:55:58 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE28F8FC15; Mon, 29 Jun 2009 16:55:57 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5TGtvOZ050104; Mon, 29 Jun 2009 16:55:57 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5TGtv8i050101; Mon, 29 Jun 2009 16:55:57 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200906291655.n5TGtv8i050101@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 29 Jun 2009 16:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195163 - projects/tcp_cc_8.x/sys/netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2009 16:55:58 -0000 Author: lstewart Date: Mon Jun 29 16:55:57 2009 New Revision: 195163 URL: http://svn.freebsd.org/changeset/base/195163 Log: Style tweaks for comments. Modified: projects/tcp_cc_8.x/sys/netinet/cc.c projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Modified: projects/tcp_cc_8.x/sys/netinet/cc.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc.c Mon Jun 29 16:45:50 2009 (r195162) +++ projects/tcp_cc_8.x/sys/netinet/cc.c Mon Jun 29 16:55:57 2009 (r195163) @@ -102,7 +102,7 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) CC_LIST_RUNLOCK(); error = sysctl_handle_string(oidp, default_cc, 1, req); } else { - /* Find algo with specified name and set it to default */ + /* Find algo with specified name and set it to default. */ CC_LIST_WLOCK(); STAILQ_FOREACH(funcs, &cc_list, entries) { if (strncmp((char *)req->newptr, funcs->name, TCP_CA_NAME_MAX) == 0) { Modified: projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Mon Jun 29 16:45:50 2009 (r195162) +++ projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Mon Jun 29 16:55:57 2009 (r195163) @@ -1381,9 +1381,7 @@ tcp_ctloutput(struct socket *so, struct break; INP_WLOCK_RECHECK(inp); /* - * We return EINVAL if we can't find the requested cc - * algo. We set error here and reset to 0 if found to - * simplify the error checking, + * Return EINVAL if we can't find the requested cc algo. */ error = EINVAL; CC_LIST_RLOCK(); @@ -1391,34 +1389,31 @@ tcp_ctloutput(struct socket *so, struct if ( strncmp(buf, algo->name, TCP_CA_NAME_MAX) == 0) { - /* - * we've found the requested algo, - * so revert the EINVAL error condition. - */ + /* We've found the requested algo. */ error = 0; /* - * we hold a write lock over the tcb + * We hold a write lock over the tcb * so it's safe to do these things - * without ordering concerns + * without ordering concerns. */ if (CC_ALGO(tp)->conn_destroy != NULL) CC_ALGO(tp)->conn_destroy(tp); CC_ALGO(tp) = algo; /* - * if something goes pear shaped + * If something goes pear shaped * initialising the new algo, * fall back to newreno (which - * does not require initialisation) + * does not require initialisation). */ if (algo->conn_init(tp) > 0) { CC_ALGO(tp) = &newreno_cc_algo; /* - * the only reason init() should - * fail is because of malloc + * The only reason init should + * fail is because of malloc. */ error = ENOMEM; } - break; /* break the STAILQ_FOREACH */ + break; /* Break the STAILQ_FOREACH. */ } } CC_LIST_RUNLOCK();