Subject: Re: CVS commit: src/usr.bin/xlint/lint1
To: None <source-changes@NetBSD.org>
From: Christian Biere <christianbiere@gmx.de>
List: source-changes
Date: 10/18/2006 16:48:39
Christian Biere wrote:
> This might be a good start:
> 
> $ grep -Er [(][a-z ]*(int[a-z0-9_]*|long|char)[)][ ]?[0-9] .

This also doesn't discriminate against certain developers
and finds very old bugs:


Index: llscan.c
===================================================================
RCS file: /cvsroot/src/sys/netiso/xebec/llscan.c,v
retrieving revision 1.11
diff -u -p -r1.11 llscan.c
--- llscan.c	11 Dec 2005 12:25:16 -0000	1.11
+++ llscan.c	18 Oct 2006 14:43:49 -0000
@@ -266,14 +266,14 @@ char o,c;
 int
 getch()
 {
-	char c;
+	int c;
 	extern FILE *infile;
 	extern int lineno;
 
-	c = fgetc(infile) ;
+	c = fgetc(infile);
 	if (c == '\n') lineno++;
-	if ((int)c ==  EOF) c = (char)0;
-	if (feof(infile)) c = (char) 0;
+	if (c == EOF) c = 0;
+	if (feof(infile)) c = 0;
 	IFDEBUG(e)
 		fprintf(stdout, "getch: 0x%x\n", c);
 		(void) fputc( c, stdout);

-- 
Christian