Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: reduce memory usage
details: https://anonhg.NetBSD.org/src/rev/73cff91e46d8
branches: trunk
changeset: 982157:73cff91e46d8
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Apr 02 22:05:43 2021 +0000
description:
lint: reduce memory usage
No functional change.
diffstat:
usr.bin/xlint/lint1/lex.c | 8 ++++----
usr.bin/xlint/lint1/lint1.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (53 lines):
diff -r f10cd350b980 -r 73cff91e46d8 usr.bin/xlint/lint1/lex.c
--- a/usr.bin/xlint/lint1/lex.c Fri Apr 02 17:25:04 2021 +0000
+++ b/usr.bin/xlint/lint1/lex.c Fri Apr 02 22:05:43 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.22 2021/04/02 12:16:50 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.23 2021/04/02 22:05:43 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.22 2021/04/02 12:16:50 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.23 2021/04/02 22:05:43 rillig Exp $");
#endif
#include <ctype.h>
@@ -56,13 +56,13 @@
/* Current position (it's also updated when an included file is parsed) */
-pos_t curr_pos = { 1, "", 0 };
+pos_t curr_pos = { "", 1, 0 };
/*
* Current position in C source (not updated when an included file is
* parsed).
*/
-pos_t csrc_pos = { 1, "", 0 };
+pos_t csrc_pos = { "", 1, 0 };
/* Are we parsing a gcc attribute? */
bool attron;
diff -r f10cd350b980 -r 73cff91e46d8 usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h Fri Apr 02 17:25:04 2021 +0000
+++ b/usr.bin/xlint/lint1/lint1.h Fri Apr 02 22:05:43 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.91 2021/04/02 09:39:25 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.92 2021/04/02 22:05:43 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -59,8 +59,8 @@
* Describes the position of a declaration or anything else.
*/
typedef struct {
+ const char *p_file;
int p_line;
- const char *p_file;
int p_uniq; /* uniquifier */
} pos_t;
Home |
Main Index |
Thread Index |
Old Index