Date: Mon, 29 Jun 2009 16:55:57 +0000 (UTC) From: Lawrence Stewart <lstewart@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r195163 - projects/tcp_cc_8.x/sys/netinet Message-ID: <200906291655.n5TGtv8i050101@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906291655.n5TGtv8i050101>