diff options
author | lstewart <lstewart@FreeBSD.org> | 2010-11-16 08:43:25 +0000 |
---|---|---|
committer | lstewart <lstewart@FreeBSD.org> | 2010-11-16 08:43:25 +0000 |
commit | c63666dcd4f55b0ce96f16101d217a0e20601539 (patch) | |
tree | f1407e4e355d734efdef2c08c5a68672508a2073 /sys/netinet/cc | |
parent | 4cb0a4f8c615e1b78564b81d97cbc5270a8bbe58 (diff) | |
download | FreeBSD-src-c63666dcd4f55b0ce96f16101d217a0e20601539.zip FreeBSD-src-c63666dcd4f55b0ce96f16101d217a0e20601539.tar.gz |
- 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
Diffstat (limited to 'sys/netinet/cc')
-rw-r--r-- | sys/netinet/cc/cc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index 009ebe7..dc50cda 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -106,14 +106,13 @@ cc_set_default(struct cc_algo *new_default) 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 *remove_cc) } } CC_LIST_WUNLOCK(); - + if (!err) /* * XXXLAS: |