From b69c34dad3717624ff6b4f32b71014ee05b6a678 Mon Sep 17 00:00:00 2001 From: Brian Bennett Date: Tue, 4 Feb 2020 10:14:15 -0800 Subject: 12271 "name" member of "struct option" should be const Reviewed by: Toomas Soome Reviewed by: C Fraire Reviewed by: Robert Mustacchi Approved by: Dan McDonald --- usr/src/common/cmdparse/cmdparse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/src/common/cmdparse/cmdparse.c') diff --git a/usr/src/common/cmdparse/cmdparse.c b/usr/src/common/cmdparse/cmdparse.c index 07ad6ed13a..bc55dc8dce 100644 --- a/usr/src/common/cmdparse/cmdparse.c +++ b/usr/src/common/cmdparse/cmdparse.c @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2018, Joyent, Inc. + * Copyright 2020 Joyent Inc. */ #include @@ -71,7 +71,7 @@ static int getSubcommandProps(char *, subCommandProps_t **); static char *getExecBasename(char *); static void usage(uint_t); static void subUsage(uint_t, subCommandProps_t *); -static char *getLongOption(int); +static const char *getLongOption(int); static char *getOptionArgDesc(int); /* global data */ @@ -121,7 +121,7 @@ getSubcommandProps(char *subCommand, subCommandProps_t **subCommandProps) * on success, long option name * on failure, NULL */ -static char * +static const char * getLongOption(int shortOption) { struct option *op; @@ -171,7 +171,7 @@ subUsage(uint_t usageType, subCommandProps_t *subcommand) { int i; char *optionArgDesc; - char *longOpt; + const char *longOpt; if (usageType == GENERAL_USAGE) { (void) printf("%s:\t%s %s [", gettext("Usage"), commandName, -- cgit v1.2.3