Date: Fri, 6 Jul 2007 23:24:22 GMT From: "Constantine A. Murenin" <cnst@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 123038 for review Message-ID: <200707062324.l66NOMHn090582@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=123038 Change 123038 by cnst@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707062324.l66NOMHn090582>