opnsense-src/sys/sys/copyright.h
Zhenlei Huang 497f577f46 kernel: Make some compile time constant variables const
Those variables are not going to be changed at runtime. Make them const
to avoid potential overwriting. This will also help spotting accidental
global variables shadowing, since the variable's name such as `version`
is short and commonly used.

This change was inspired by reviewing khng's work D44760.

No functional change intended.

MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D45227

(cherry picked from commit 356be1348dac94ba0d2dc1f479bc1f8a2ebaa03a)
2024-09-20 18:04:02 +08:00

49 lines
2 KiB
C

/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 1992-2023 The FreeBSD Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* Copyrights macros */
/* Add a FreeBSD vendor copyright here - or via CFLAGS */
#ifndef COPYRIGHT_Vendor
#define COPYRIGHT_Vendor \
""
#endif
/* FreeBSD */
#define COPYRIGHT_FreeBSD \
"Copyright (c) 1992-2023 The FreeBSD Project.\n"
/* Foundation */
#define TRADEMARK_Foundation \
"FreeBSD is a registered trademark of The FreeBSD Foundation.\n"
/* Berkeley */
#define COPYRIGHT_UCB \
"Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994\n\tThe Regents of the University of California. All rights reserved.\n"
const char copyright[] = COPYRIGHT_Vendor COPYRIGHT_FreeBSD COPYRIGHT_UCB;
const char trademark[] = TRADEMARK_Foundation;