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: remove unused fnalloc
details: https://anonhg.NetBSD.org/src/rev/7468d464968d
branches: trunk
changeset: 953986:7468d464968d
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Mar 27 11:47:59 2021 +0000
description:
lint: remove unused fnalloc
diffstat:
usr.bin/xlint/lint1/externs1.h | 3 +--
usr.bin/xlint/lint1/mem1.c | 16 ++++++----------
2 files changed, 7 insertions(+), 12 deletions(-)
diffs (61 lines):
diff -r f3eb637c3050 -r 7468d464968d usr.bin/xlint/lint1/externs1.h
--- a/usr.bin/xlint/lint1/externs1.h Sat Mar 27 11:08:00 2021 +0000
+++ b/usr.bin/xlint/lint1/externs1.h Sat Mar 27 11:47:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: externs1.h,v 1.87 2021/03/26 18:54:39 rillig Exp $ */
+/* $NetBSD: externs1.h,v 1.88 2021/03/27 11:47:59 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -93,7 +93,6 @@
/*
* mem1.c
*/
-extern const char *fnalloc(const char *);
extern const char *fnnalloc(const char *, size_t);
extern int getfnid(const char *);
extern void fnaddreplsrcdir(char *);
diff -r f3eb637c3050 -r 7468d464968d usr.bin/xlint/lint1/mem1.c
--- a/usr.bin/xlint/lint1/mem1.c Sat Mar 27 11:08:00 2021 +0000
+++ b/usr.bin/xlint/lint1/mem1.c Sat Mar 27 11:47:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mem1.c,v 1.28 2021/03/26 20:31:07 rillig Exp $ */
+/* $NetBSD: mem1.c,v 1.29 2021/03/27 11:47:59 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.28 2021/03/26 20:31:07 rillig Exp $");
+__RCSID("$NetBSD: mem1.c,v 1.29 2021/03/27 11:47:59 rillig Exp $");
#endif
#include <sys/types.h>
@@ -75,14 +75,6 @@
return fn;
}
-/* Return a copy of the filename s with unlimited lifetime. */
-const char *
-fnalloc(const char *s)
-{
-
- return s != NULL ? fnnalloc(s, strlen(s)) : NULL;
-}
-
struct repl {
char *orig;
char *repl;
@@ -124,6 +116,10 @@
return buf;
}
+/*
+ * Return a copy of the filename s with unlimited lifetime.
+ * If the filename is new, it is written to the output file.
+ */
const char *
fnnalloc(const char *s, size_t len)
{
Home |
Main Index |
Thread Index |
Old Index