summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-21 13:52:49 +0200
committerToomas Soome <tsoome@me.com>2019-06-24 21:05:53 +0300
commit9320f4959b6c72e7a6d056623827091cace259ee (patch)
treef85b2ef2512dd5324d63d4e63e9ea5572346e1ae
parentfb8f92baa78fdf1ddda6f49125fbd59366393ac8 (diff)
downloadillumos-joyent-9320f4959b6c72e7a6d056623827091cace259ee.tar.gz
11106 elfedit: NULL pointer errors
Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/sgs/elfedit/common/elfedit.c10
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/common/cap.c22
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/common/dyn.c28
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/common/ehdr.c14
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/common/phdr.c14
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/common/shdr.c18
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/common/str.c36
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/common/sym.c36
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/common/syminfo.c12
9 files changed, 95 insertions, 95 deletions
diff --git a/usr/src/cmd/sgs/elfedit/common/elfedit.c b/usr/src/cmd/sgs/elfedit/common/elfedit.c
index 2018d93bdd..8894ef312b 100644
--- a/usr/src/cmd/sgs/elfedit/common/elfedit.c
+++ b/usr/src/cmd/sgs/elfedit/common/elfedit.c
@@ -268,7 +268,7 @@ elfedit_msg(elfedit_msg_t type, const char *format, ...)
{
typedef enum { /* What to do after finished */
DISP_RET = 0, /* Return to caller */
- DISP_JMP = 1, /* if (interactive) longjmp else exit */
+ DISP_JMP = 1, /* if (interactive) longjmp else exit */
DISP_EXIT = 2 /* exit under all circumstances */
} DISP;
@@ -1420,7 +1420,7 @@ path_is_so(const char *path)
static const char *
elfedit_basename(const char *path, const char *tail, char *buf, size_t bufsiz)
{
- const char *s;
+ const char *s;
if (tail == NULL)
tail = path + strlen(path);
@@ -1676,7 +1676,7 @@ validate_optarg(elfedit_cmd_optarg_t *optarg, int isopt, MODLIST_T *moddef,
/* MSG_INTL(MSG_ERR_CMDOA_VALNAM) */
FAIL(MSG_ERR_CMDOA_VALNAM);
}
- if ((oa1->oa_help != NULL) || (oa1->oa_flags != 0) ||
+ if ((oa1->oa_help != 0) || (oa1->oa_flags != 0) ||
(oa1->oa_idmask != 0) || (oa1->oa_excmask != 0)) {
/* MSG_INTL(MSG_ERR_CMDOA_VALNOT0) */
FAIL(MSG_ERR_CMDOA_VALNOT0);
@@ -1977,7 +1977,7 @@ elfedit_load_moddir(const char *dirpath, int must_exist, int abs_path)
char path[PATH_MAX + 1];
DIR *dir;
struct dirent *dp;
- const char *tail;
+ const char *tail;
dir = opendir(dirpath);
if (dir == NULL) {
@@ -3225,7 +3225,7 @@ cmd_match_fcn(WordCompletion *cpl, void *data, const char *line, int word_end)
}
skip_one = 0;
ostyle_ndx = -1;
- if ((strcmp(argv[i], MSG_ORIG(MSG_STR_MINUS_MINUS)) == NULL) ||
+ if ((strcmp(argv[i], MSG_ORIG(MSG_STR_MINUS_MINUS)) == 0) ||
(*argv[i] != '-')) {
opt_term_seen = 1;
continue;
diff --git a/usr/src/cmd/sgs/elfedit/modules/common/cap.c b/usr/src/cmd/sgs/elfedit/modules/common/cap.c
index 6b94a6f8f4..7430d4d84f 100644
--- a/usr/src/cmd/sgs/elfedit/modules/common/cap.c
+++ b/usr/src/cmd/sgs/elfedit/modules/common/cap.c
@@ -131,7 +131,7 @@ typedef struct {
struct { /* String table */
elfedit_section_t *sec;
} str;
- cap_opt_t optmask; /* Mask of options used */
+ cap_opt_t optmask; /* Mask of options used */
int argc; /* # of plain arguments */
const char **argv; /* Plain arguments */
} ARGSTATE;
@@ -1237,18 +1237,18 @@ elfedit_init(elfedit_module_version_t version)
{
/* For commands that only accept -capid, -and, -cmp, -o, and -or */
static elfedit_cmd_optarg_t opt_ostyle_capid_bitop[] = {
- { ELFEDIT_STDOA_OPT_AND, NULL,
+ { ELFEDIT_STDOA_OPT_AND, 0,
ELFEDIT_CMDOA_F_INHERIT, CAP_OPT_F_AND, CAP_OPT_F_OR },
{ MSG_ORIG(MSG_STR_MINUS_CAPID),
/* MSG_INTL(MSG_OPTDESC_CAPID) */
ELFEDIT_I18NHDL(MSG_OPTDESC_CAPID), ELFEDIT_CMDOA_F_VALUE,
CAP_OPT_F_CAPID, CAP_OPT_F_CAPNDX },
- { MSG_ORIG(MSG_STR_IDNAME), NULL, 0 },
- { ELFEDIT_STDOA_OPT_CMP, NULL,
+ { MSG_ORIG(MSG_STR_IDNAME), 0, 0 },
+ { ELFEDIT_STDOA_OPT_CMP, 0,
ELFEDIT_CMDOA_F_INHERIT, CAP_OPT_F_CMP, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
- { ELFEDIT_STDOA_OPT_OR, NULL,
+ { ELFEDIT_STDOA_OPT_OR, 0,
ELFEDIT_CMDOA_F_INHERIT, CAP_OPT_F_OR, CAP_OPT_F_AND },
{ NULL }
};
@@ -1259,7 +1259,7 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_CAPID) */
ELFEDIT_I18NHDL(MSG_OPTDESC_CAPID), ELFEDIT_CMDOA_F_VALUE,
CAP_OPT_F_CAPID, CAP_OPT_F_CAPNDX },
- { MSG_ORIG(MSG_STR_IDNAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_IDNAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_CAPNDX),
/* MSG_INTL(MSG_OPTDESC_CAPNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_CAPNDX), 0,
@@ -1290,12 +1290,12 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_CAPID) */
ELFEDIT_I18NHDL(MSG_OPTDESC_CAPID), ELFEDIT_CMDOA_F_VALUE,
CAP_OPT_F_CAPID, CAP_OPT_F_CAPNDX },
- { MSG_ORIG(MSG_STR_IDNAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_IDNAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_CAPNDX),
/* MSG_INTL(MSG_OPTDESC_CAPNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_CAPNDX), 0,
CAP_OPT_F_CAPNDX, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ NULL }
};
@@ -1319,12 +1319,12 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_CAPID) */
ELFEDIT_I18NHDL(MSG_OPTDESC_CAPID), ELFEDIT_CMDOA_F_VALUE,
CAP_OPT_F_CAPID, CAP_OPT_F_CAPNDX },
- { MSG_ORIG(MSG_STR_IDNAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_IDNAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_CAPNDX),
/* MSG_INTL(MSG_OPTDESC_CAPNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_CAPNDX), 0,
CAP_OPT_F_CAPNDX, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_S),
/* MSG_INTL(MSG_OPTDESC_S) */
diff --git a/usr/src/cmd/sgs/elfedit/modules/common/dyn.c b/usr/src/cmd/sgs/elfedit/modules/common/dyn.c
index ac8ec4b401..d4949e6ee7 100644
--- a/usr/src/cmd/sgs/elfedit/modules/common/dyn.c
+++ b/usr/src/cmd/sgs/elfedit/modules/common/dyn.c
@@ -133,7 +133,7 @@ typedef struct {
Word null_ndx; /* Index of first DT_NULL */
Word num_null_ndx; /* # of DT_NULL elements */
} dyn;
- dyn_opt_t optmask; /* Mask of options used */
+ dyn_opt_t optmask; /* Mask of options used */
int argc; /* # of plain arguments */
const char **argv; /* Plain arguments */
const char *dyn_elt_str; /* Value string for */
@@ -1846,20 +1846,20 @@ elfedit_init(elfedit_module_version_t version)
{
/* For commands that only accept -o */
static elfedit_cmd_optarg_t opt_ostyle[] = {
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ NULL }
};
/* For commands that only accept -and, -cmp, -o, -or */
static elfedit_cmd_optarg_t opt_ostyle_bitop[] = {
- { ELFEDIT_STDOA_OPT_AND, NULL,
+ { ELFEDIT_STDOA_OPT_AND, 0,
ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_AND, DYN_OPT_F_OR },
- { ELFEDIT_STDOA_OPT_CMP, NULL,
+ { ELFEDIT_STDOA_OPT_CMP, 0,
ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_CMP, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
- { ELFEDIT_STDOA_OPT_OR, NULL,
+ { ELFEDIT_STDOA_OPT_OR, 0,
ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_OR, DYN_OPT_F_AND },
{ NULL }
};
@@ -1895,7 +1895,7 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_DYNNDX_ELT) */
ELFEDIT_I18NHDL(MSG_OPTDESC_DYNNDX_ELT), 0,
DYN_OPT_F_DYNNDX_ELT, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ NULL }
};
@@ -1923,7 +1923,7 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_DYNNDX_ELT) */
ELFEDIT_I18NHDL(MSG_OPTDESC_DYNNDX_ELT), 0,
DYN_OPT_F_DYNNDX_ELT, DYN_OPT_F_ADD },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_S),
/* MSG_INTL(MSG_OPTDESC_S) */
@@ -1990,25 +1990,25 @@ elfedit_init(elfedit_module_version_t version)
static const char *name_posflag1[] = { MSG_ORIG(MSG_CMD_POSFLAG1),
NULL };
static elfedit_cmd_optarg_t opt_posflag1[] = {
- { ELFEDIT_STDOA_OPT_AND, NULL,
+ { ELFEDIT_STDOA_OPT_AND, 0,
ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_AND, DYN_OPT_F_OR },
- { ELFEDIT_STDOA_OPT_CMP, NULL,
+ { ELFEDIT_STDOA_OPT_CMP, 0,
ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_CMP, 0 },
{ MSG_ORIG(MSG_STR_MINUS_DYNNDX),
/* MSG_INTL(MSG_OPTDESC_DYNNDX_VAL) */
ELFEDIT_I18NHDL(MSG_OPTDESC_DYNNDX_VAL),
ELFEDIT_CMDOA_F_VALUE,
DYN_OPT_F_DYNNDX_VAL, DYN_OPT_F_NEEDED },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_NEEDED),
/* MSG_INTL(MSG_OPTDESC_NEEDED) */
ELFEDIT_I18NHDL(MSG_OPTDESC_NEEDED),
ELFEDIT_CMDOA_F_VALUE,
DYN_OPT_F_NEEDED, DYN_OPT_F_DYNNDX_VAL },
- { MSG_ORIG(MSG_STR_PREFIX), NULL, 0, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { MSG_ORIG(MSG_STR_PREFIX), 0, 0, 0 },
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
- { ELFEDIT_STDOA_OPT_OR, NULL,
+ { ELFEDIT_STDOA_OPT_OR, 0,
ELFEDIT_CMDOA_F_INHERIT, DYN_OPT_F_OR, DYN_OPT_F_AND },
{ NULL }
};
diff --git a/usr/src/cmd/sgs/elfedit/modules/common/ehdr.c b/usr/src/cmd/sgs/elfedit/modules/common/ehdr.c
index fe377df0eb..8de483834a 100644
--- a/usr/src/cmd/sgs/elfedit/modules/common/ehdr.c
+++ b/usr/src/cmd/sgs/elfedit/modules/common/ehdr.c
@@ -140,7 +140,7 @@ typedef enum {
*/
typedef struct {
elfedit_obj_state_t *obj_state;
- ehdr_opt_t optmask; /* Mask of options used */
+ ehdr_opt_t optmask; /* Mask of options used */
int argc; /* # of plain arguments */
const char **argv; /* Plain arguments */
} ARGSTATE;
@@ -1763,7 +1763,7 @@ elfedit_init(elfedit_module_version_t version)
{
/* Many of the commands only accept -o */
static elfedit_cmd_optarg_t opt_std[] = {
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ NULL }
};
@@ -1861,13 +1861,13 @@ elfedit_init(elfedit_module_version_t version)
static const char *name_e_flags[] = {
MSG_ORIG(MSG_CMD_E_FLAGS), NULL };
static elfedit_cmd_optarg_t opt_e_flags[] = {
- { ELFEDIT_STDOA_OPT_AND, NULL,
+ { ELFEDIT_STDOA_OPT_AND, 0,
ELFEDIT_CMDOA_F_INHERIT, EHDR_OPT_F_AND, EHDR_OPT_F_OR },
- { ELFEDIT_STDOA_OPT_CMP, NULL,
+ { ELFEDIT_STDOA_OPT_CMP, 0,
ELFEDIT_CMDOA_F_INHERIT, EHDR_OPT_F_CMP, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
- { ELFEDIT_STDOA_OPT_OR, NULL,
+ { ELFEDIT_STDOA_OPT_OR, 0,
ELFEDIT_CMDOA_F_INHERIT, EHDR_OPT_F_OR, EHDR_OPT_F_AND },
{ NULL }
};
@@ -1938,7 +1938,7 @@ elfedit_init(elfedit_module_version_t version)
static const char *name_e_shstrndx[] = {
MSG_ORIG(MSG_CMD_E_SHSTRNDX), NULL };
static elfedit_cmd_optarg_t opt_e_shstrndx[] = {
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
diff --git a/usr/src/cmd/sgs/elfedit/modules/common/phdr.c b/usr/src/cmd/sgs/elfedit/modules/common/phdr.c
index e4129c9de1..0300913f2e 100644
--- a/usr/src/cmd/sgs/elfedit/modules/common/phdr.c
+++ b/usr/src/cmd/sgs/elfedit/modules/common/phdr.c
@@ -130,7 +130,7 @@ typedef enum {
*/
typedef struct {
elfedit_obj_state_t *obj_state;
- phdr_opt_t optmask; /* Mask of options used */
+ phdr_opt_t optmask; /* Mask of options used */
int argc; /* # of plain arguments */
const char **argv; /* Plain arguments */
int ndx_set; /* True if ndx is valid */
@@ -1078,7 +1078,7 @@ elfedit_init(elfedit_module_version_t version)
{
/* Multiple commands accept a standard set of options */
static elfedit_cmd_optarg_t opt_std[] = {
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_PHNDX),
/* MSG_INTL(MSG_OPTDESC_PHNDX) */
@@ -1203,17 +1203,17 @@ elfedit_init(elfedit_module_version_t version)
static const char *name_p_flags[] = {
MSG_ORIG(MSG_CMD_P_FLAGS), NULL };
static elfedit_cmd_optarg_t opt_p_flags[] = {
- { ELFEDIT_STDOA_OPT_AND, NULL,
+ { ELFEDIT_STDOA_OPT_AND, 0,
ELFEDIT_CMDOA_F_INHERIT, PHDR_OPT_F_AND, PHDR_OPT_F_OR },
- { ELFEDIT_STDOA_OPT_CMP, NULL,
+ { ELFEDIT_STDOA_OPT_CMP, 0,
ELFEDIT_CMDOA_F_INHERIT, PHDR_OPT_F_CMP, 0 },
{ MSG_ORIG(MSG_STR_MINUS_PHNDX),
/* MSG_INTL(MSG_OPTDESC_PHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_PHNDX), 0,
PHDR_OPT_F_PHNDX, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
- { ELFEDIT_STDOA_OPT_OR, NULL,
+ { ELFEDIT_STDOA_OPT_OR, 0,
ELFEDIT_CMDOA_F_INHERIT, PHDR_OPT_F_OR, PHDR_OPT_F_AND },
{ NULL }
};
@@ -1247,7 +1247,7 @@ elfedit_init(elfedit_module_version_t version)
/* phdr:interp */
static const char *name_interp[] = { MSG_ORIG(MSG_CMD_INTERP), NULL };
static elfedit_cmd_optarg_t opt_interp[] = {
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ NULL }
};
diff --git a/usr/src/cmd/sgs/elfedit/modules/common/shdr.c b/usr/src/cmd/sgs/elfedit/modules/common/shdr.c
index 72881d02f9..e35906f0cb 100644
--- a/usr/src/cmd/sgs/elfedit/modules/common/shdr.c
+++ b/usr/src/cmd/sgs/elfedit/modules/common/shdr.c
@@ -120,7 +120,7 @@ typedef enum {
*/
typedef struct {
elfedit_obj_state_t *obj_state;
- shdr_opt_t optmask; /* Mask of options used */
+ shdr_opt_t optmask; /* Mask of options used */
int argc; /* # of plain arguments */
const char **argv; /* Plain arguments */
} ARGSTATE;
@@ -216,7 +216,7 @@ print_shdr(SHDR_CMD_T cmd, int autoprint, ARGSTATE *argstate,
Ehdr *ehdr = argstate->obj_state->os_ehdr;
uchar_t osabi = ehdr->e_ident[EI_OSABI];
Half mach = ehdr->e_machine;
- elfedit_section_t *ref_sec = &argstate->obj_state->os_secarr[ndx];
+ elfedit_section_t *ref_sec = &argstate->obj_state->os_secarr[ndx];
if ((autoprint && ((elfedit_flags() & ELFEDIT_F_AUTOPRINT) == 0)) ||
@@ -939,7 +939,7 @@ elfedit_init(elfedit_module_version_t version)
{
/* Multiple commands accept only the standard set of options */
static elfedit_cmd_optarg_t opt_std[] = {
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
@@ -957,7 +957,7 @@ elfedit_init(elfedit_module_version_t version)
* plus -value_shnam and -value_shtyp.
*/
static elfedit_cmd_optarg_t opt_infolink[] = {
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
@@ -1052,13 +1052,13 @@ elfedit_init(elfedit_module_version_t version)
static const char *name_sh_flags[] = {
MSG_ORIG(MSG_CMD_SH_FLAGS), NULL };
static elfedit_cmd_optarg_t opt_sh_flags[] = {
- { ELFEDIT_STDOA_OPT_AND, NULL,
+ { ELFEDIT_STDOA_OPT_AND, 0,
ELFEDIT_CMDOA_F_INHERIT, SHDR_OPT_F_AND, SHDR_OPT_F_OR },
- { ELFEDIT_STDOA_OPT_CMP, NULL,
+ { ELFEDIT_STDOA_OPT_CMP, 0,
ELFEDIT_CMDOA_F_INHERIT, SHDR_OPT_F_CMP, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
- { ELFEDIT_STDOA_OPT_OR, NULL,
+ { ELFEDIT_STDOA_OPT_OR, 0,
ELFEDIT_CMDOA_F_INHERIT, SHDR_OPT_F_OR, SHDR_OPT_F_AND },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
@@ -1120,7 +1120,7 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_NAME_OFFSET) */
ELFEDIT_I18NHDL(MSG_OPTDESC_NAME_OFFSET), 0,
SHDR_OPT_F_NAMOFFSET, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
diff --git a/usr/src/cmd/sgs/elfedit/modules/common/str.c b/usr/src/cmd/sgs/elfedit/modules/common/str.c
index 968bf5d214..2767284a11 100644
--- a/usr/src/cmd/sgs/elfedit/modules/common/str.c
+++ b/usr/src/cmd/sgs/elfedit/modules/common/str.c
@@ -111,7 +111,7 @@ typedef enum {
*/
typedef struct {
elfedit_obj_state_t *obj_state;
- str_opt_t optmask; /* Mask of options used */
+ str_opt_t optmask; /* Mask of options used */
int argc; /* # of plain arguments */
const char **argv; /* Plain arguments */
@@ -750,7 +750,7 @@ cpl_sh_opt(elfedit_obj_state_t *obj_state, void *cpldata, int argc,
{
enum { NAME, INDEX, TYPE } op;
elfedit_section_t *sec;
- Word ndx;
+ Word ndx;
if ((argc != num_opt) || (argc < 2))
return;
@@ -948,23 +948,23 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_ANY) */
ELFEDIT_I18NHDL(MSG_OPTDESC_ANY), 0,
STR_OPT_F_ANY, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNAM),
/* MSG_INTL(MSG_OPTDESC_SHNAM) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHNAME, STR_OPT_F_SHNDX | STR_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_NAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_NAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHNDX, STR_OPT_F_SHNAME | STR_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHTYP),
/* MSG_INTL(MSG_OPTDESC_SHTYP) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHTYP, STR_OPT_F_SHNAME | STR_OPT_F_SHNDX },
- { MSG_ORIG(MSG_STR_TYPE), NULL, 0 },
+ { MSG_ORIG(MSG_STR_TYPE), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_STRNDX),
/* MSG_INTL(MSG_OPTDESC_STRNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_STRNDX), 0,
@@ -987,7 +987,7 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_ANY) */
ELFEDIT_I18NHDL(MSG_OPTDESC_ANY), 0,
STR_OPT_F_ANY, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_NOTERM),
/* MSG_INTL(MSG_OPTDESC_NOTERM) */
@@ -997,17 +997,17 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_SHNAM) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHNAME, STR_OPT_F_SHNDX | STR_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_NAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_NAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHNDX, STR_OPT_F_SHNAME | STR_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHTYP),
/* MSG_INTL(MSG_OPTDESC_SHTYP) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHTYP, STR_OPT_F_SHNAME | STR_OPT_F_SHNDX },
- { MSG_ORIG(MSG_STR_TYPE), NULL, 0 },
+ { MSG_ORIG(MSG_STR_TYPE), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_STRNDX),
/* MSG_INTL(MSG_OPTDESC_STRNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_STRNDX), 0,
@@ -1030,23 +1030,23 @@ elfedit_init(elfedit_module_version_t version)
static const char *name_add[] = {
MSG_ORIG(MSG_CMD_ADD), NULL };
static elfedit_cmd_optarg_t opt_add[] = {
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNAM),
/* MSG_INTL(MSG_OPTDESC_SHNAM) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHNAME, STR_OPT_F_SHNDX | STR_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_NAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_NAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHNDX, STR_OPT_F_SHNAME | STR_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHTYP),
/* MSG_INTL(MSG_OPTDESC_SHTYP) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHTYP, STR_OPT_F_SHNAME | STR_OPT_F_SHNDX },
- { MSG_ORIG(MSG_STR_TYPE), NULL, 0 },
+ { MSG_ORIG(MSG_STR_TYPE), 0, 0 },
{ NULL }
};
static elfedit_cmd_optarg_t arg_add[] = {
@@ -1065,23 +1065,23 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_ANY) */
ELFEDIT_I18NHDL(MSG_OPTDESC_ANY), 0,
STR_OPT_F_ANY, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNAM),
/* MSG_INTL(MSG_OPTDESC_SHNAM) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHNAME, STR_OPT_F_SHNDX | STR_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_NAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_NAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHNDX, STR_OPT_F_SHNAME | STR_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHTYP),
/* MSG_INTL(MSG_OPTDESC_SHTYP) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE,
STR_OPT_F_SHTYP, STR_OPT_F_SHNAME | STR_OPT_F_SHNDX },
- { MSG_ORIG(MSG_STR_TYPE), NULL, 0 },
+ { MSG_ORIG(MSG_STR_TYPE), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_STRNDX),
/* MSG_INTL(MSG_OPTDESC_STRNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_STRNDX), 0,
diff --git a/usr/src/cmd/sgs/elfedit/modules/common/sym.c b/usr/src/cmd/sgs/elfedit/modules/common/sym.c
index 40e3a30e2e..5b0ec36291 100644
--- a/usr/src/cmd/sgs/elfedit/modules/common/sym.c
+++ b/usr/src/cmd/sgs/elfedit/modules/common/sym.c
@@ -116,7 +116,7 @@ typedef enum {
/* index section */
SYM_OPT_F_NAMOFFSET = 2, /* -name_offset: sym:st_name name arg */
/* is numeric offset */
- /* rather than ASCII string */
+ /* rather than ASCII string */
SYM_OPT_F_SECSHNDX = 4, /* -secshndx: Section arg is */
/* section index, not name */
SYM_OPT_F_SECSHTYP = 8, /* -secshtyp: Section arg is */
@@ -171,7 +171,7 @@ typedef struct {
} SYMSTATE;
typedef struct {
elfedit_obj_state_t *obj_state;
- sym_opt_t optmask; /* Mask of options used */
+ sym_opt_t optmask; /* Mask of options used */
int argc; /* # of plain arguments */
const char **argv; /* Plain arguments */
int numsymstate; /* # of items in symstate[] */
@@ -1471,7 +1471,7 @@ cpl_sh_opt(elfedit_obj_state_t *obj_state, void *cpldata, int argc,
{
enum { NAME, INDEX, TYPE } op;
elfedit_symtab_t *symtab;
- Word tblndx;
+ Word tblndx;
if ((argc != num_opt) || (argc < 2))
return;
@@ -1689,21 +1689,21 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_SHNAM) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHNAME, SYM_OPT_F_SHNDX | SYM_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_NAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_NAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHNDX, SYM_OPT_F_SHNAME | SYM_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHTYP),
/* MSG_INTL(MSG_OPTDESC_SHTYP) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHTYP, SYM_OPT_F_SHNAME | SYM_OPT_F_SHNDX },
- { MSG_ORIG(MSG_STR_TYPE), NULL, 0 },
+ { MSG_ORIG(MSG_STR_TYPE), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SYMNDX),
/* MSG_INTL(MSG_OPTDESC_SYMNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SYMNDX), 0, SYM_OPT_F_SYMNDX },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0 },
{ NULL }
};
@@ -1719,17 +1719,17 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_SHNAM) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHNAME, SYM_OPT_F_SHNDX | SYM_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_NAME), NULL, 0 },
+ { MSG_ORIG(MSG_STR_NAME), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHNDX, SYM_OPT_F_SHNAME | SYM_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHTYP),
/* MSG_INTL(MSG_OPTDESC_SHTYP) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHTYP, SYM_OPT_F_SHNAME | SYM_OPT_F_SHNDX },
- { MSG_ORIG(MSG_STR_TYPE), NULL, 0 },
+ { MSG_ORIG(MSG_STR_TYPE), 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SYMNDX),
/* MSG_INTL(MSG_OPTDESC_SYMNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SYMNDX), 0, SYM_OPT_F_SYMNDX },
@@ -1781,17 +1781,17 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_SHNAM) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHNAME, SYM_OPT_F_SHNDX | SYM_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_NAME), NULL, 0, 0 },
+ { MSG_ORIG(MSG_STR_NAME), 0, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHNDX, SYM_OPT_F_SHNAME | SYM_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHTYP),
/* MSG_INTL(MSG_OPTDESC_SHTYP) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHTYP, SYM_OPT_F_SHNAME | SYM_OPT_F_SHNDX },
- { MSG_ORIG(MSG_STR_TYPE), NULL, 0, 0 },
+ { MSG_ORIG(MSG_STR_TYPE), 0, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SYMNDX),
/* MSG_INTL(MSG_OPTDESC_SYMNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SYMNDX), 0,
@@ -1800,7 +1800,7 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_NAME_OFFSET) */
ELFEDIT_I18NHDL(MSG_OPTDESC_NAME_OFFSET), 0,
SYM_OPT_F_NAMOFFSET, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ NULL }
};
@@ -1842,22 +1842,22 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_SHNAM) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNAM), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHNAME, SYM_OPT_F_SHNDX | SYM_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_NAME), NULL, 0, 0 },
+ { MSG_ORIG(MSG_STR_NAME), 0, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHNDX),
/* MSG_INTL(MSG_OPTDESC_SHNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHNDX), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHNDX, SYM_OPT_F_SHNAME | SYM_OPT_F_SHTYP },
- { MSG_ORIG(MSG_STR_INDEX), NULL, 0, 0 },
+ { MSG_ORIG(MSG_STR_INDEX), 0, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SHTYP),
/* MSG_INTL(MSG_OPTDESC_SHTYP) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SHTYP), ELFEDIT_CMDOA_F_VALUE,
SYM_OPT_F_SHTYP, SYM_OPT_F_SHNAME | SYM_OPT_F_SHNDX },
- { MSG_ORIG(MSG_STR_TYPE), NULL, 0, 0 },
+ { MSG_ORIG(MSG_STR_TYPE), 0, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SYMNDX),
/* MSG_INTL(MSG_OPTDESC_SYMNDX) */
ELFEDIT_I18NHDL(MSG_OPTDESC_SYMNDX), 0,
SYM_OPT_F_SYMNDX, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SECSHNDX),
/* MSG_INTL(MSG_OPTDESC_SECSHNDX) */
diff --git a/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c b/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c
index c06f3be6cb..59b78c8587 100644
--- a/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c
+++ b/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c
@@ -109,7 +109,7 @@ typedef enum {
*/
typedef struct {
elfedit_obj_state_t *obj_state;
- syminfo_opt_t optmask; /* Mask of options used */
+ syminfo_opt_t optmask; /* Mask of options used */
int argc; /* # of plain arguments */
const char **argv; /* Plain arguments */
struct { /* Syminfo */
@@ -796,7 +796,7 @@ elfedit_init(elfedit_module_version_t version)
/* MSG_INTL(MSG_OPTDESC_NEEDED) */
ELFEDIT_I18NHDL(MSG_OPTDESC_NEEDED), 0,
SYMINFO_OPT_F_NEEDED, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
{ MSG_ORIG(MSG_STR_MINUS_SYMNDX),
/* MSG_INTL(MSG_OPTDESC_SYMNDX) */
@@ -820,13 +820,13 @@ elfedit_init(elfedit_module_version_t version)
static const char *name_si_flags[] = {
MSG_ORIG(MSG_CMD_SI_FLAGS), NULL };
static elfedit_cmd_optarg_t opt_si_flags[] = {
- { ELFEDIT_STDOA_OPT_AND, NULL, ELFEDIT_CMDOA_F_INHERIT,
+ { ELFEDIT_STDOA_OPT_AND, 0, ELFEDIT_CMDOA_F_INHERIT,
SYMINFO_OPT_F_AND, SYMINFO_OPT_F_OR },
- { ELFEDIT_STDOA_OPT_CMP, NULL,
+ { ELFEDIT_STDOA_OPT_CMP, 0,
ELFEDIT_CMDOA_F_INHERIT, SYMINFO_OPT_F_CMP, 0 },
- { ELFEDIT_STDOA_OPT_O, NULL,
+ { ELFEDIT_STDOA_OPT_O, 0,
ELFEDIT_CMDOA_F_INHERIT, 0, 0 },
- { ELFEDIT_STDOA_OPT_OR, NULL, ELFEDIT_CMDOA_F_INHERIT,
+ { ELFEDIT_STDOA_OPT_OR, 0, ELFEDIT_CMDOA_F_INHERIT,
SYMINFO_OPT_F_OR, SYMINFO_OPT_F_AND },
{ MSG_ORIG(MSG_STR_MINUS_SYMNDX),
/* MSG_INTL(MSG_OPTDESC_SYMNDX) */