Date: Tue, 16 Nov 2010 08:43:25 +0000 (UTC) From: Lawrence Stewart <lstewart@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215393 - head/sys/netinet/cc Message-ID: <201011160843.oAG8hPCm046080@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011160843.oAG8hPCm046080>