mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-12 19:20:28 +03:00
freebsd: libshare/nfs: constify static const data
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13165
This commit is contained in:
parent
45588be285
commit
5f0c1c4ebd
@ -78,9 +78,9 @@ static sa_fstype_t *nfs_fstype;
|
||||
static char *
|
||||
translate_opts(const char *shareopts)
|
||||
{
|
||||
static const char *known_opts[] = { "ro", "maproot", "mapall", "mask",
|
||||
"network", "sec", "alldirs", "public", "webnfs", "index", "quiet",
|
||||
NULL };
|
||||
static const char *const known_opts[] = { "ro", "maproot", "mapall",
|
||||
"mask", "network", "sec", "alldirs", "public", "webnfs", "index",
|
||||
"quiet" };
|
||||
static char newopts[OPTSSIZE];
|
||||
char oldopts[OPTSSIZE];
|
||||
char *o, *s = NULL;
|
||||
@ -93,7 +93,7 @@ translate_opts(const char *shareopts)
|
||||
while ((o = strsep(&s, "-, ")) != NULL) {
|
||||
if (o[0] == '\0')
|
||||
continue;
|
||||
for (i = 0; known_opts[i] != NULL; i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(known_opts); ++i) {
|
||||
len = strlen(known_opts[i]);
|
||||
if (strncmp(known_opts[i], o, len) == 0 &&
|
||||
(o[len] == '\0' || o[len] == '=')) {
|
||||
|
Loading…
Reference in New Issue
Block a user