mirror of
https://github.com/openbsd/src.git
synced 2026-04-23 21:54:32 +00:00
Declare pledgenames[] as const.
OK deraadt@
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kern_pledge.c,v 1.261 2020/02/15 09:35:48 anton Exp $ */
|
||||
/* $OpenBSD: kern_pledge.c,v 1.262 2020/04/05 07:31:45 visa Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
|
||||
@@ -527,7 +527,7 @@ pledge_syscall(struct proc *p, int code, uint64_t *tval)
|
||||
int
|
||||
pledge_fail(struct proc *p, int error, uint64_t code)
|
||||
{
|
||||
char *codes = "";
|
||||
const char *codes = "";
|
||||
int i;
|
||||
struct sigaction sa;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pledge.h,v 1.40 2019/06/19 16:55:51 deraadt Exp $ */
|
||||
/* $OpenBSD: pledge.h,v 1.41 2020/04/05 07:31:45 visa Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
|
||||
@@ -72,9 +72,9 @@
|
||||
#define PLEDGE_YPACTIVE 0x8000000000000000ULL /* YP use detected and allowed */
|
||||
|
||||
#ifdef PLEDGENAMES
|
||||
static struct {
|
||||
static const struct {
|
||||
uint64_t bits;
|
||||
char *name;
|
||||
const char *name;
|
||||
} pledgenames[] = {
|
||||
{ PLEDGE_RPATH, "rpath" },
|
||||
{ PLEDGE_WPATH, "wpath" },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kdump.c,v 1.141 2020/01/18 23:56:31 cheloha Exp $ */
|
||||
/* $OpenBSD: kdump.c,v 1.142 2020/04/05 07:31:45 visa Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988, 1993
|
||||
@@ -1375,7 +1375,7 @@ ktrexec(const char *ptr, size_t len)
|
||||
static void
|
||||
ktrpledge(struct ktr_pledge *pledge, size_t len)
|
||||
{
|
||||
char *name = "";
|
||||
const char *name = "";
|
||||
int i;
|
||||
|
||||
if (len < sizeof(struct ktr_pledge))
|
||||
|
||||
Reference in New Issue
Block a user