Module Name:    src
Committed By:   christos
Date:           Thu Dec 29 19:40:35 UTC 2016

Modified Files:
        src/usr.bin/xlint/lint1: scan.l

Log Message:
only return attributes if looking for attributes


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/xlint/lint1/scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.71 src/usr.bin/xlint/lint1/scan.l:1.72
--- src/usr.bin/xlint/lint1/scan.l:1.71	Thu Dec 29 13:44:49 2016
+++ src/usr.bin/xlint/lint1/scan.l	Thu Dec 29 14:40:35 2016
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.71 2016/12/29 18:44:49 christos Exp $ */
+/* $NetBSD: scan.l,v 1.72 2016/12/29 19:40:35 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.71 2016/12/29 18:44:49 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.72 2016/12/29 19:40:35 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -523,7 +523,7 @@ search(sbuf_t *sb)
 				struct kwtab *kw = sym->s_keyw;
 				if (!kw->kw_attr || attron)
 					return (sym);
-			} else if (sym->s_kind == symtyp)
+			} else if (!attron && sym->s_kind == symtyp)
 				return sym;
 		}
 	}

Reply via email to