summaryrefslogtreecommitdiff
path: root/usr/src/common
diff options
context:
space:
mode:
authorBrian Bennett <brian.bennett@joyent.com>2020-02-04 10:14:15 -0800
committerDan McDonald <danmcd@joyent.com>2020-03-03 19:23:38 -0500
commitb69c34dad3717624ff6b4f32b71014ee05b6a678 (patch)
treec931a3c926615adb82c48439072e1e431477d137 /usr/src/common
parent84de666edc7f7d835057ae4807a387447c086bcf (diff)
downloadillumos-joyent-b69c34dad3717624ff6b4f32b71014ee05b6a678.tar.gz
12271 "name" member of "struct option" should be const
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/common')
-rw-r--r--usr/src/common/cmdparse/cmdparse.c8
1 files changed, 4 insertions, 4 deletions
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 <stdlib.h>
@@ -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,