PERFORCE change 123038 for review
Constantine A. Murenin
cnst at FreeBSD.org
Fri Jul 6 23:24:23 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123038
Change 123038 by cnst at dale on 2007/07/06 23:24:07
some KNF for FreeBSD's kern_sysctl.c
Affected files ...
.. //depot/projects/soc2007/cnst-sensors/sys.kern/kern_sysctl.c#2 edit
Differences ...
==== //depot/projects/soc2007/cnst-sensors/sys.kern/kern_sysctl.c#2 (text+ko) ====
@@ -80,11 +80,9 @@
{
struct sysctl_oid *oidp;
- SLIST_FOREACH(oidp, list, oid_link) {
- if (strcmp(oidp->oid_name, name) == 0) {
+ SLIST_FOREACH(oidp, list, oid_link)
+ if (strcmp(oidp->oid_name, name) == 0)
return (oidp);
- }
- }
return (NULL);
}
@@ -185,9 +183,8 @@
sysctl_ctx_init(struct sysctl_ctx_list *c)
{
- if (c == NULL) {
+ if (c == NULL)
return (EINVAL);
- }
TAILQ_INIT(c);
return (0);
}
@@ -262,10 +259,9 @@
if (clist == NULL || oidp == NULL)
return(NULL);
- TAILQ_FOREACH(e, clist, link) {
+ TAILQ_FOREACH(e, clist, link)
if(e->entry == oidp)
return(e);
- }
return (e);
}
@@ -658,7 +654,7 @@
static SYSCTL_NODE(_sysctl, 2, next, CTLFLAG_RD, sysctl_sysctl_next, "");
static int
-name2oid (char *name, int *oid, int *len, struct sysctl_oid **oidpp)
+name2oid(char *name, int *oid, int *len, struct sysctl_oid **oidpp)
{
int i;
struct sysctl_oid *oidp;
More information about the p4-projects
mailing list