From c2383573c3602ec077a9e0ad41dba63fb47fa7ac Mon Sep 17 00:00:00 2001 From: Donn Seeley Date: Sat, 12 Dec 1987 03:28:49 -0800 Subject: [PATCH] utah rcsid 1.3 87/07/15 20:51:25: Use ~nargs rather than -nargs to identify VARARGS functions so that VARARGS0 can be distinguished from a function with fixed 0 arguments. SCCS-vsn: old/pcc/lint/lpass2/lpass2.c 1.9 --- usr/src/old/pcc/lint/lpass2/lpass2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/src/old/pcc/lint/lpass2/lpass2.c b/usr/src/old/pcc/lint/lpass2/lpass2.c index c559869eb8..88f24727b9 100644 --- a/usr/src/old/pcc/lint/lpass2/lpass2.c +++ b/usr/src/old/pcc/lint/lpass2/lpass2.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)lpass2.c 1.8 (Berkeley) %G%"; +static char sccsid[] = "@(#)lpass2.c 1.9 (Berkeley) %G%"; #endif lint # include "macdefs.h" @@ -158,7 +158,7 @@ lread(m){ /* read a line into r.l */ portify(r.l.name); #endif /* !FLEXNAMES */ n = r.l.nargs; - if( n<0 ) n = -n; + if( n<0 ) n = ~n; if( n>=NTY ) error( "more than %d args?", n ); fread( (char *)atyp, sizeof(ATYPE), n, stdin ); if( ( r.l.decflag & m ) ) return( 1 ); @@ -452,7 +452,7 @@ setuse(q) STAB *q; { /* check new type to ensure that it is used */ q->decflag = r.l.decflag; q->symty.t = r.l.type; if( r.l.nargs < 0 ){ - q->nargs = -r.l.nargs; + q->nargs = ~r.l.nargs; q->use = VARARGS; } else { @@ -609,7 +609,7 @@ prc() { printf( "type.extra1\t0x%x (%d,%d)\n", j, j & X_NONAME ? 1 : 0, j & ~X_NONAME ); k = r.l.nargs; - if( k < 0 ) k = -k; + if( k < 0 ) k = ~k; for( i = 0; i < k; i++ ){ printf( "atyp[%d].aty\t0%o (", i, atyp[i].aty ); pty( atyp[i].aty, "" ); -- 2.20.1