VirtualBox

Changeset 3449 in kBuild for trunk/src/kash/parser.c


Ignore:
Timestamp:
Sep 13, 2020 11:17:09 AM (5 years ago)
Author:
bird
Message:

kash: Eliminate the 'temp' node field in nfile so we can share node trees later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/parser.c

    r3440 r3449  
    11991199        union node *np;
    12001200        char fd = *out;
    1201         char dummy[   sizeof(struct nfile) >= sizeof(struct ndup)
    1202                    && sizeof(struct nfile) >= sizeof(struct nhere) ? 1 : 0];
     1201        char dummy[   sizeof(struct ndup) >= sizeof(struct nfile)
     1202                   && sizeof(struct ndup) >= sizeof(struct nhere) ? 1 : 0];
    12031203        (void)dummy;
    12041204
    1205         np = (union node *)stalloc(psh, sizeof (struct nfile));
    1206         np->nfile.expfname = NULL;
     1205        np = (union node *)stalloc(psh, sizeof (struct ndup));
    12071206        if (c == '>') {
    12081207                np->nfile.fd = 1;
     
    18991898                                ret->nfile.next      = copyparsetree(psh, src->nfile.next);
    19001899                                ret->nfile.fname     = copyparsetree(psh, src->nfile.fname);
    1901                                 /** @todo complicated, we should copy it in some contexts but no all. sigh.  */
    1902                                 ret->nfile.expfname  = stsavestr(psh, src->nfile.expfname);
    19031900                                break;
    19041901
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette