Ignore:
Timestamp:
Sep 4, 2016, 10:09:43 PM (9 years ago)
Author:
bird
Message:

Fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/kSubmit.c

    r2868 r2875  
    11411141 * @param   pszValue            The var=value string to apply.
    11421142 */
    1143 static int kSubmitOptEnvSet(char **papszEnv, unsigned *pcEnvVars, unsigned *pcAllocatedEnvVars,
     1143static int kSubmitOptEnvSet(char ***ppapszEnv, unsigned *pcEnvVars, unsigned *pcAllocatedEnvVars,
    11441144                            int cVerbosity, const char *pszValue)
    11451145{
     
    11471147    if (pszEqual)
    11481148    {
     1149        char   **papszEnv = *ppapszEnv;
    11491150        unsigned iEnvVar;
    11501151        unsigned cEnvVars = *pcEnvVars;
     
    11661167            {
    11671168                *pcAllocatedEnvVars = (cEnvVars + 2 + 0xf) & ~(unsigned)0xf;
    1168                 papszEnv = (char **)xrealloc(papszEnv, *pcAllocatedEnvVars * sizeof(papszEnv[0]));
     1169                *ppapszEnv = papszEnv = (char **)xrealloc(papszEnv, *pcAllocatedEnvVars * sizeof(papszEnv[0]));
    11691170            }
    11701171            papszEnv[cEnvVars++] = xstrdup(pszValue);
     
    13971398        {
    13981399            char chOpt = *++pszArg;
     1400            pszArg++;
    13991401            if (chOpt != '-')
    14001402            {
     
    14091411            else
    14101412            {
    1411                 pszArg++;
    1412 
    14131413                /* '--' indicates where the bits to execute start. */
    14141414                if (*pszArg == '\0')
     
    14181418                }
    14191419
    1420                 if (strcmp(pszArg, "watcom-brain-damage") == 0)
     1420                if (   strcmp(pszArg, "wcc-brain-damage") == 0
     1421                    || strcmp(pszArg, "watcom-brain-damage") == 0)
    14211422                {
    14221423                    fWatcomBrainDamage = 1;
     
    14871488
    14881489                    case 'E':
    1489                         rcExit = kSubmitOptEnvSet(papszEnv, &cEnvVars, &cAllocatedEnvVars, cVerbosity, pszValue);
     1490                        rcExit = kSubmitOptEnvSet(&papszEnv, &cEnvVars, &cAllocatedEnvVars, cVerbosity, pszValue);
    14901491                        pChild->environment = papszEnv;
    14911492                        if (rcExit == 0)
Note: See TracChangeset for help on using the changeset viewer.