Skip to content

Commit

Permalink
Simplify nv_addtype()
Browse files Browse the repository at this point in the history
Resolves #1410
  • Loading branch information
krader1961 committed Oct 3, 2019
1 parent c68faf0 commit e02c662
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/cmd/ksh93/sh/nvtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,8 @@ void nv_addtype(Namval_t *np, const char *optstr, void *op, size_t optsz) {
Namval_t *mp, *bp;
char *name;

if (optstr) {
cp->optstring = optstr;
} else {
cp->optstring = sh_opttype;
}
assert(optstr);
cp->optstring = optstr;
memcpy(dp, op, optsz);
cp->optinfof = dp;
cp->tp = np;
Expand Down

0 comments on commit e02c662

Please sign in to comment.