Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint lint: unexport nomem



details:   https://anonhg.NetBSD.org/src/rev/fc3215ca2687
branches:  trunk
changeset: 984955:fc3215ca2687
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 01 18:07:35 2021 +0000

description:
lint: unexport nomem

No functional change.

diffstat:

 usr.bin/xlint/common/externs.h |   3 +--
 usr.bin/xlint/common/mem.c     |  21 +++++++++------------
 usr.bin/xlint/lint1/mem1.c     |   8 ++++----
 3 files changed, 14 insertions(+), 18 deletions(-)

diffs (96 lines):

diff -r 4e369672c560 -r fc3215ca2687 usr.bin/xlint/common/externs.h
--- a/usr.bin/xlint/common/externs.h    Sun Aug 01 18:02:22 2021 +0000
+++ b/usr.bin/xlint/common/externs.h    Sun Aug 01 18:07:35 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: externs.h,v 1.15 2021/08/01 17:59:47 rillig Exp $      */
+/*     $NetBSD: externs.h,v 1.16 2021/08/01 18:07:35 rillig Exp $      */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -57,7 +57,6 @@
 extern void    *xcalloc(size_t, size_t);
 extern void    *xrealloc(void *, size_t);
 extern char    *xstrdup(const char *);
-extern void    nomem(void);
 extern  void   xasprintf(char **, const char *, ...) __printflike(2, 3);
 
 /*
diff -r 4e369672c560 -r fc3215ca2687 usr.bin/xlint/common/mem.c
--- a/usr.bin/xlint/common/mem.c        Sun Aug 01 18:02:22 2021 +0000
+++ b/usr.bin/xlint/common/mem.c        Sun Aug 01 18:07:35 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mem.c,v 1.13 2021/08/01 17:59:47 rillig Exp $  */
+/*     $NetBSD: mem.c,v 1.14 2021/08/01 18:07:35 rillig Exp $  */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,18 +37,22 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: mem.c,v 1.13 2021/08/01 17:59:47 rillig Exp $");
+__RCSID("$NetBSD: mem.c,v 1.14 2021/08/01 18:07:35 rillig Exp $");
 #endif
 
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/mman.h>
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "lint.h"
 
+static void __attribute__((noreturn))
+nomem(void)
+{
+
+       errx(1, "virtual memory exhausted");
+}
+
 void *
 xmalloc(size_t s)
 {
@@ -92,13 +96,6 @@
        return s2;
 }
 
-void __attribute__((noreturn))
-nomem(void)
-{
-
-       errx(1, "virtual memory exhausted");
-}
-
 void
 xasprintf(char **buf, const char *fmt, ...)
 {
diff -r 4e369672c560 -r fc3215ca2687 usr.bin/xlint/lint1/mem1.c
--- a/usr.bin/xlint/lint1/mem1.c        Sun Aug 01 18:02:22 2021 +0000
+++ b/usr.bin/xlint/lint1/mem1.c        Sun Aug 01 18:07:35 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mem1.c,v 1.46 2021/08/01 17:59:47 rillig Exp $ */
+/*     $NetBSD: mem1.c,v 1.47 2021/08/01 18:07:35 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: mem1.c,v 1.46 2021/08/01 17:59:47 rillig Exp $");
+__RCSID("$NetBSD: mem1.c,v 1.47 2021/08/01 18:07:35 rillig Exp $");
 #endif
 
 #include <sys/types.h>
@@ -398,8 +398,8 @@
 }
 
 /*
- * Free all memory used for the current expression and the memory used
- * be a previous expression and saved by expr_save_memory(). The next call to
+ * Free all memory used for the current expression and restore the memory used
+ * by a previous expression and saved by expr_save_memory(). The next call to
  * expr_free_all() frees the restored memory.
  */
 void



Home | Main Index | Thread Index | Old Index