Subject: Re: Another vax incompatibility: /src/sys/kern/kern_resource.c
To: User Staylor <staylor@mrynet.com>
From: None <ragge@ludd.luth.se>
List: tech-kern
Date: 05/14/2004 08:25:12
This way of declaring variables is not in line with the NetBSD style document,
so they should be fixed anyway.
-- Ragge
> Hi,
>
> Just found another incompatibility with port-vax:
>
> Introduced on May 6 by pk@netbsd.org, rev 1.83 of /src/sys/kern/kern_resource.c
> Look like the current gcc doesn't require declarations to be at the beginning
> of a function.
>
> ttyp3:--ROOT--@smedley (159): cvs diff -c sys/kern/kern_resource.c
> Index: sys/kern/kern_resource.c
> ===================================================================
> RCS file: /cvsroot/src/sys/kern/kern_resource.c,v
> retrieving revision 1.83
> diff -c -r1.83 kern_resource.c
> *** sys/kern/kern_resource.c 6 May 2004 22:20:30 -0000 1.83
> --- sys/kern/kern_resource.c 13 May 2004 17:21:21 -0000
> ***************
> *** 535,542 ****
> struct plimit *lim;
> {
>
> simple_lock(&lim->p_slock);
> ! int n = --lim->p_refcnt;
> simple_unlock(&lim->p_slock);
> if (n > 0)
> return;
> --- 535,543 ----
> struct plimit *lim;
> {
>
> + int n;
> simple_lock(&lim->p_slock);
> ! n = --lim->p_refcnt;
> simple_unlock(&lim->p_slock);
> if (n > 0)
> return;
>
> Cheers,
> -scott
>