Author: lstewart
Date: Tue Nov 16 08:43:25 2010
New Revision: 215393
URL: http://svn.freebsd.org/changeset/base/215393
Log:
- Querying the default CC algo is more common than setting it and the function
is small, so there is no good reason not to declare the buffer at the top.
- Fix a whitespace nit.
Sponsored by: FreeBSD Foundation
MFC after: 11 weeks
X-MFC with: r215166
Modified:
head/sys/netinet/cc/cc.c
Modified: head/sys/netinet/cc/cc.c
==============================================================================
--- head/sys/netinet/cc/cc.c Tue Nov 16 08:30:39 2010 (r215392)
+++ head/sys/netinet/cc/cc.c Tue Nov 16 08:43:25 2010 (r215393)
@@ -106,14 +106,13 @@ cc_set_default(struct cc_algo *new_defau
static int
cc_default_algo(SYSCTL_HANDLER_ARGS)
{
+ char default_cc[TCP_CA_NAME_MAX];
struct cc_algo *funcs;
int err, found;
err = found = 0;
if (req->newptr == NULL) {
- char default_cc[TCP_CA_NAME_MAX];
-
/* Just print the current default. */
CC_LIST_RLOCK();
strlcpy(default_cc, CC_DEFAULT()->name, TCP_CA_NAME_MAX);
@@ -216,7 +215,7 @@ cc_deregister_algo(struct cc_algo *remov
}
}
CC_LIST_WUNLOCK();
-
+
if (!err)
/*
* XXXLAS:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"