From owner-freebsd-bugs@FreeBSD.ORG Mon Jun 19 17:40:20 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E8A116A47F for ; Mon, 19 Jun 2006 17:40:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D654C43D49 for ; Mon, 19 Jun 2006 17:40:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k5JHeI5D091244 for ; Mon, 19 Jun 2006 17:40:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k5JHeIiE091243; Mon, 19 Jun 2006 17:40:18 GMT (envelope-from gnats) Resent-Date: Mon, 19 Jun 2006 17:40:18 GMT Resent-Message-Id: <200606191740.k5JHeIiE091243@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ulf Lilleengen Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6169E16A479 for ; Mon, 19 Jun 2006 17:30:57 +0000 (UTC) (envelope-from lulf@studby.ntnu.no) Received: from royk.itea.ntnu.no (royk.itea.ntnu.no [129.241.190.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D3BA43D7B for ; Mon, 19 Jun 2006 17:30:42 +0000 (GMT) (envelope-from lulf@studby.ntnu.no) Received: from localhost (localhost [127.0.0.1]) by royk.itea.ntnu.no (Postfix) with ESMTP id 1347466C95 for ; Mon, 19 Jun 2006 19:30:41 +0200 (CEST) Received: from studby.ntnu.no (m170h.studby.ntnu.no [129.241.135.170]) by royk.itea.ntnu.no (Postfix) with ESMTP for ; Mon, 19 Jun 2006 19:30:40 +0200 (CEST) Received: by studby.ntnu.no (Postfix, from userid 1001) id EE17733C3B; Mon, 19 Jun 2006 19:30:43 +0200 (CEST) Message-Id: <20060619173043.EE17733C3B@studby.ntnu.no> Date: Mon, 19 Jun 2006 19:30:43 +0200 (CEST) From: Ulf Lilleengen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/99183: [PATCH] Gvinum stylefix X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ulf Lilleengen List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2006 17:40:20 -0000 >Number: 99183 >Category: kern >Synopsis: [PATCH] Gvinum stylefix >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 19 17:40:17 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Ulf Lilleengen >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: System: FreeBSD vimes.studby.ntnu.no 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Fri Jun 2 20:19:30 CEST 2006 lulf@vimes.studby.ntnu.no:/usr/obj/usr/src/sys/VIMES i386 >Description: I'm starting to submit some of the patches i have in my perforce repository lulf_gvinum now. Starting with this. Style fixes for gvinum. >How-To-Repeat: >Fix: --- gvinum_stylefix.diff begins here --- --- //depot/vendor/freebsd/src/sys/geom/vinum/geom_vinum_share.c 2004/11/15 12:35:32 +++ //depot/user/lulf/gvinum/src/sys/geom/vinum/geom_vinum_share.c 2006/05/27 12:39:37 @@ -91,7 +91,7 @@ /* End of line. */ if ((*cptr == '\0') || (*cptr == '\n') || (*cptr == '#')) - return tokennr; + return (tokennr); delim = *cptr; token[tokennr] = cptr; /* Point to it. */ @@ -99,7 +99,7 @@ /* Run off the end? */ if (tokennr == maxtoken) - return tokennr; + return (tokennr); /* Quoted? */ if ((delim == '\'') || (delim == '"')) { @@ -112,14 +112,14 @@ /* Space after closing quote needed. */ if (!iswhite(*cptr)) - return -1; + return (-1); /* Delimit. */ *cptr++ = '\0'; /* End-of-line? */ } else if ((*cptr == '\0') || (*cptr == '\n')) - return -1; + return (-1); } /* Not quoted. */ @@ -136,7 +136,7 @@ } /* Can't get here. */ - return maxtoken; + return (maxtoken); } @@ -181,25 +181,25 @@ switch (*s) { case '\0': - return size * sign; + return (size * sign); case 'B': case 'b': case 'S': case 's': - return size * sign * 512; + return (size * sign * 512); case 'K': case 'k': - return size * sign * 1024; + return (size * sign * 1024); case 'M': case 'm': - return size * sign * 1024 * 1024; + return (size * sign * 1024 * 1024); case 'G': case 'g': - return size * sign * 1024 * 1024 * 1024; + return (size * sign * 1024 * 1024 * 1024); } } } @@ -212,11 +212,11 @@ { switch (state) { case GV_DRIVE_DOWN: - return "down"; + return ("down"); case GV_DRIVE_UP: - return "up"; + return ("up"); default: - return "??"; + return ("??"); } } @@ -249,17 +249,17 @@ { switch (state) { case GV_SD_INITIALIZING: - return "initializing"; + return ("initializing"); case GV_SD_STALE: - return "stale"; + return ("stale"); case GV_SD_DOWN: - return "down"; + return ("down"); case GV_SD_REVIVING: - return "reviving"; + return ("reviving"); case GV_SD_UP: - return "up"; + return ("up"); default: - return "??"; + return ("??"); } } @@ -283,15 +283,15 @@ { switch (state) { case GV_PLEX_DOWN: - return "down"; + return ("down"); case GV_PLEX_INITIALIZING: - return "initializing"; + return ("initializing"); case GV_PLEX_DEGRADED: - return "degraded"; + return ("degraded"); case GV_PLEX_UP: - return "up"; + return ("up"); default: - return "??"; + return ("??"); } } @@ -323,11 +323,11 @@ { switch (state) { case GV_VOL_UP: - return "up"; + return ("up"); case GV_VOL_DOWN: - return "down"; + return ("down"); default: - return "??"; + return ("??"); } } @@ -337,15 +337,15 @@ { switch (org) { case GV_PLEX_DISORG: - return "??"; + return ("??"); case GV_PLEX_CONCAT: - return "concat"; + return ("concat"); case GV_PLEX_STRIPED: - return "striped"; + return ("striped"); case GV_PLEX_RAID5: - return "raid5"; + return ("raid5"); default: - return "??"; + return ("??"); } } @@ -354,15 +354,15 @@ { switch (org) { case GV_PLEX_DISORG: - return "??"; + return ("??"); case GV_PLEX_CONCAT: - return "C"; + return ("C"); case GV_PLEX_STRIPED: - return "S"; + return ("S"); case GV_PLEX_RAID5: - return "R5"; + return ("R5"); default: - return "??"; + return ("??"); } } @@ -557,14 +557,14 @@ int j, errors; if (token[1] == NULL || *token[1] == '\0') - return NULL; + return (NULL); #ifdef _KERNEL s = g_malloc(sizeof(struct gv_sd), M_WAITOK | M_ZERO); #else s = malloc(sizeof(struct gv_sd)); if (s == NULL) - return NULL; + return (NULL); bzero(s, sizeof(struct gv_sd)); #endif --- gvinum_stylefix.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: