From shigio@wafu.netgate.net  Fri Sep 11 22:24:18 1998
Received: from wafu.netgate.net (wafu.netgate.net [204.145.147.80])
          by hub.freebsd.org (8.8.8/8.8.8) with SMTP id WAA27183
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Sep 1998 22:24:18 -0700 (PDT)
          (envelope-from shigio@wafu.netgate.net)
Received: (qmail 28091 invoked from network); 11 Sep 1998 21:25:34 -0000
Received: from ins27.tama-ap3.dti.ne.jp (HELO choota.signet.or.jp) (203.181.67.27)
  by wafu.netgate.net with SMTP; 11 Sep 1998 21:25:34 -0000
Received: (from shigio@localhost) by choota.signet.or.jp (8.8.7/) id OAA21697; Sat, 12 Sep 1998 14:26:36 +0900 (JST)
Message-Id: <199809120524.WAA27183@hub.freebsd.org>
Date: Sat, 12 Sep 1998 14:26:36 +0900 (JST)
From: shigio@wafu.netgate.net
Reply-To: shigio@wafu.netgate.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: shigio@wafu.netgate.net
Subject: unmatched '{}' blocks.
X-Send-Pr-Version: 3.2

>Number:         7903
>Category:       kern
>Synopsis:       unmatched '{}' blocks.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 11 22:30:01 PDT 1998
>Closed-Date:    Sat May 20 22:36:55 PDT 2000
>Last-Modified:  Sat May 20 22:37:30 PDT 2000
>Originator:     Shigio Yamaguchi
>Release:        FreeBSD 3.0-19980804-SNAP
>Organization:
Freelance programmer
>Environment:

>Description:

	I have found three errors which doesn't come up to the surface.
	Probably nobody define the macros which make valid these blocks.

	[dev/pdq/pdq_ifsubr.c]

	Arp_ifinit() start at line 82 and pdq_ifinit() start at line 96
	without arp_ifini()'s ending.

	    80  #if defined(__bsdi__) && _BSDI_VERSION < 199506 /* XXX */
	    81  static void
	>   82  arp_ifinit(
	    83      struct arpcom *ac,
	    84      struct ifaddr *ifa)
	    85  {
	    86      sc->sc_ac.ac_ipaddr = IA_SIN(ifa)->sin_addr;
	    87      arpwhohas(&sc->sc_ac, &IA_SIN(ifa)->sin_addr);
	    88  #if _BSDI_VERSION >= 199401
	    89      ifa->ifa_rtrequest = arp_rtrequest;
	    90      ifa->ifa_flags |= RTF_CLONING;
	    91  #endif
	    92  #endif
	    93  
	    94  
	    95  void
	>   96  pdq_ifinit(
	    97      pdq_softc_t *sc)
	    98  {

	[gnu/i386/isa/dgb.c]

	It seems that there is a extra '}' at line 2137.

	  2132  #ifdef LEAVE_FREE_CHARS 
	  2133                  if(tail>head) {
	  2134                          size=tail-head-LEAVE_FREE_CHARS;
	  2135                          if (size <0)
	  2136                                  size==0;
	> 2137                          } else {
	  2138                                  size=port->txbufsize-head;
	  2139                                  if(tail+port->txbufsize < head)
	  2140                                          size==0;
	  2141                          }
	  2142                  }
	  2143  #else

	[pc98/boot/biosboot/boot.c]

	Extra '{' and '}'.

	    96  #ifdef PC98
	>   97          for(ret = 0; ret < 2; ret ++) {
	    98                  if (*(unsigned char*)V(0xA155d) & (1 << ret)) {
	    99                          bootinfo.bi_bios_geom[ret] = get_diskinfo(ret + 
	   100                  }
	   101  #else /* IBM-PC */
	   102          for(ret = 0; ret < N_BIOS_GEOM; ret ++)
	   103                  bootinfo.bi_bios_geom[ret] = get_diskinfo(ret + 0x80);
	   104  #endif /* PC98 */
	>  105          }

>How-To-Repeat:

>Fix:

	[dev/pdq/pdq_ifsubr.c]

	Add '}' at 93.

	[gnu/i386/isa/dgb.c]

	Remove '}' at 2137 or add '{' at 2135.

	[pc98/boot/biosboot/boot.c]

	Remove '{' at 97 and '}' at 105.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Sat May 20 22:36:55 PDT 2000 
State-Changed-Why:  
Fixed, thanks.  -current only. 
>Unformatted:
