aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 95d0aebf0..a2b798cad 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -15590,7 +15590,7 @@ static int
15590tblentry_size(int funcblocksize, struct tblentry *tep) 15590tblentry_size(int funcblocksize, struct tblentry *tep)
15591{ 15591{
15592 while (tep) { 15592 while (tep) {
15593 funcblocksize += sizeof(struct tblentry) + strlen(tep->cmdname); 15593 funcblocksize += sizeof(struct tblentry) + align_len(tep->cmdname);
15594 /* CMDBUILTIN, e->param.cmd needs no pointer relocation */ 15594 /* CMDBUILTIN, e->param.cmd needs no pointer relocation */
15595 if (tep->cmdtype == CMDFUNCTION) { 15595 if (tep->cmdtype == CMDFUNCTION) {
15596 funcblocksize += offsetof(struct funcnode, n); 15596 funcblocksize += offsetof(struct funcnode, n);
@@ -15613,7 +15613,7 @@ tblentry_copy(struct tblentry *tep)
15613 newp = &start; 15613 newp = &start;
15614 while (tep) { 15614 while (tep) {
15615 *newp = funcblock; 15615 *newp = funcblock;
15616 size = sizeof(struct tblentry) + strlen(tep->cmdname); 15616 size = sizeof(struct tblentry) + align_len(tep->cmdname);
15617 15617
15618 funcblock = (char *) funcblock + size; 15618 funcblock = (char *) funcblock + size;
15619 memcpy(*newp, tep, size); 15619 memcpy(*newp, tep, size);
@@ -15745,7 +15745,6 @@ argv_copy(char **p)
15745 SAVE_PTR(*new); 15745 SAVE_PTR(*new);
15746 ANNOT_NO_DUP(xasprintf("argv[%d] '%s'", i++, *p)); 15746 ANNOT_NO_DUP(xasprintf("argv[%d] '%s'", i++, *p));
15747 p++; 15747 p++;
15748 new++;
15749 } 15748 }
15750 new = funcblock; 15749 new = funcblock;
15751 funcblock = (char *) funcblock + sizeof(char *); 15750 funcblock = (char *) funcblock + sizeof(char *);
@@ -15779,7 +15778,6 @@ history_copy(line_input_t *st)
15779 *new = nodeckstrdup(st->history[i]); 15778 *new = nodeckstrdup(st->history[i]);
15780 SAVE_PTR(*new); 15779 SAVE_PTR(*new);
15781 ANNOT_NO_DUP(xasprintf("history[%d] '%s'", i, st->history[i])); 15780 ANNOT_NO_DUP(xasprintf("history[%d] '%s'", i, st->history[i]));
15782 new++;
15783 } 15781 }
15784 return start; 15782 return start;
15785} 15783}