Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/indent indent: make output_string inline
details: https://anonhg.NetBSD.org/src/rev/e0fa6b9fbccd
branches: trunk
changeset: 981467:e0fa6b9fbccd
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Mar 12 19:14:18 2021 +0000
description:
indent: make output_string inline
GCC 9.3.0 didn't notice that the argument to this function is always a
string literal, which makes it worthwhile to inline the call.
diffstat:
usr.bin/indent/io.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 003a962647a2 -r e0fa6b9fbccd usr.bin/indent/io.c
--- a/usr.bin/indent/io.c Fri Mar 12 19:11:29 2021 +0000
+++ b/usr.bin/indent/io.c Fri Mar 12 19:14:18 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.28 2021/03/12 19:11:29 rillig Exp $ */
+/* $NetBSD: io.c,v 1.29 2021/03/12 19:14:18 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-4-Clause
@@ -46,7 +46,7 @@
#include <sys/cdefs.h>
#ifndef lint
#if defined(__NetBSD__)
-__RCSID("$NetBSD: io.c,v 1.28 2021/03/12 19:11:29 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.29 2021/03/12 19:14:18 rillig Exp $");
#elif defined(__FreeBSD__)
__FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $");
#endif
@@ -77,7 +77,7 @@
fwrite(s, 1, (size_t)(e - s), output);
}
-static void
+static inline void
output_string(const char *s)
{
output_range(s, s + strlen(s));
Home |
Main Index |
Thread Index |
Old Index