From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 7 10:20:15 2005 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 2FAF816A41C for ; Thu, 7 Jul 2005 10:20:15 +0000 (GMT) (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 AD46843D45 for ; Thu, 7 Jul 2005 10:20:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j67AKEUd064185 for ; Thu, 7 Jul 2005 10:20:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j67AKEVS064184; Thu, 7 Jul 2005 10:20:14 GMT (envelope-from gnats) Resent-Date: Thu, 7 Jul 2005 10:20:14 GMT Resent-Message-Id: <200507071020.j67AKEVS064184@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, Antoine Brodin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 522C016A41F for ; Thu, 7 Jul 2005 10:17:31 +0000 (GMT) (envelope-from antoine@madhouse.dreadbsd.org) Received: from barton.dreadbsd.org (madhouse.dreadbsd.org [82.67.196.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id C94D243D48 for ; Thu, 7 Jul 2005 10:17:30 +0000 (GMT) (envelope-from antoine@madhouse.dreadbsd.org) Received: from barton.dreadbsd.org (localhost [127.0.0.1]) by barton.dreadbsd.org (8.13.4/8.13.4) with ESMTP id j67AHTMD076608 for ; Thu, 7 Jul 2005 12:17:29 +0200 (CEST) (envelope-from antoine@madhouse.dreadbsd.org) Received: (from antoine@localhost) by barton.dreadbsd.org (8.13.4/8.13.1/Submit) id j67AHSxP076607; Thu, 7 Jul 2005 12:17:28 +0200 (CEST) (envelope-from antoine) Message-Id: <200507071017.j67AHSxP076607@barton.dreadbsd.org> Date: Thu, 7 Jul 2005 12:17:28 +0200 (CEST) From: Antoine Brodin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/83088: [patch] remove a few bogous semicolons X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Antoine Brodin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2005 10:20:15 -0000 >Number: 83088 >Category: kern >Synopsis: [patch] remove a few bogous semicolons >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: Thu Jul 07 10:20:14 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Antoine Brodin >Release: FreeBSD 6.0-CURRENT i386 >Organization: none >Environment: System: FreeBSD barton.dreadbsd.org 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Wed Jul 6 21:48:13 CEST 2005 antoine@barton.dreadbsd.org:/usr/obj/usr/src/sys/BARTON i386 >Description: The attached patch removes a few bogous semicolons at the end of the definitions of do { ... } while (0) macros. This could cause problems if the macros were used in if statements. >How-To-Repeat: >Fix: --- while.diff begins here --- Index: net/route.h =================================================================== RCS file: /home/ncvs/src/sys/net/route.h,v retrieving revision 1.63 diff -u -p -r1.63 route.h --- net/route.h 7 Jan 2005 01:45:35 -0000 1.63 +++ net/route.h 7 Jul 2005 09:37:46 -0000 @@ -292,13 +292,13 @@ struct rt_addrinfo { KASSERT((_rt)->rt_refcnt >= 0, \ ("negative refcnt %ld", (_rt)->rt_refcnt)); \ (_rt)->rt_refcnt++; \ -} while (0); +} while (0) #define RT_REMREF(_rt) do { \ RT_LOCK_ASSERT(_rt); \ KASSERT((_rt)->rt_refcnt > 0, \ ("bogus refcnt %ld", (_rt)->rt_refcnt)); \ (_rt)->rt_refcnt--; \ -} while (0); +} while (0) #define RTFREE_LOCKED(_rt) do { \ if ((_rt)->rt_refcnt <= 1) \ Index: sys/filedesc.h =================================================================== RCS file: /home/ncvs/src/sys/sys/filedesc.h,v retrieving revision 1.72 diff -u -p -r1.72 filedesc.h --- sys/filedesc.h 10 Feb 2005 12:27:58 -0000 1.72 +++ sys/filedesc.h 7 Jul 2005 09:37:19 -0000 @@ -105,7 +105,7 @@ struct filedesc_to_leader { (fd)->fd_locked = 2; \ (fd)->fd_wanted--; \ mtx_unlock(&(fd)->fd_mtx); \ - } while (0); + } while (0) #define FILEDESC_UNLOCK(fd) \ do { \ @@ -116,7 +116,7 @@ struct filedesc_to_leader { if ((fd)->fd_wanted) \ wakeup(&(fd)->fd_locked); \ mtx_unlock(&(fd)->fd_mtx); \ - } while (0); + } while (0) #define FILEDESC_LOCK_FAST(fd) \ do { \ @@ -126,7 +126,7 @@ struct filedesc_to_leader { msleep(&(fd)->fd_locked, &(fd)->fd_mtx, PLOCK, "fdesc", 0); \ (fd)->fd_locked = 1; \ (fd)->fd_wanted--; \ - } while (0); + } while (0) #define FILEDESC_UNLOCK_FAST(fd) \ do { \ @@ -136,7 +136,7 @@ struct filedesc_to_leader { if ((fd)->fd_wanted) \ wakeup(&(fd)->fd_locked); \ mtx_unlock(&(fd)->fd_mtx); \ - } while (0); + } while (0) #ifdef INVARIANT_SUPPORT #define FILEDESC_LOCK_ASSERT(fd, arg) \ @@ -145,7 +145,7 @@ struct filedesc_to_leader { KASSERT((fd)->fd_locked != 0, ("fdesc locking mistake")); \ else \ KASSERT((fd)->fd_locked == 0, ("fdesc locking mistake")); \ - } while (0); + } while (0) #else #define FILEDESC_LOCK_ASSERT(fd, arg) #endif --- while.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: