Changeset 3477 for trunk/src/kash/eval.c


Ignore:
Timestamp:
Sep 17, 2020, 11:52:16 PM (5 years ago)
Author:
bird
Message:

kash: Use kHlpAssert instead of assert.h (debugger stops on the assertion rather than at exit process code).

File:
1 edited

Legend:

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

    r3475 r3477  
    4141#endif
    4242
    43 #include <assert.h>
    4443#include <stddef.h>
    4544#include <stdlib.h>
     
    528527                        break;
    529528                default:
    530                         assert(redir->type == NHERE || redir->type == NXHERE);
     529                        kHlpAssert(redir->type == NHERE || redir->type == NXHERE);
    531530                        expfnames->names[i] = NULL;
    532531                        break;
    533532                }
    534533        }
    535         assert(i == expfnames->count);
     534        kHlpAssert(i == expfnames->count);
    536535
    537536        /* Do the linking at the end, as nesting happens when we expand backtick arguments. */
     
    545544{
    546545        redirexpfnames *expfnames = psh->expfnames;
    547         assert(expfnames == NULL ? depth == 0 : expfnames->depth == depth || expfnames->depth + 1 == depth);
     546        kHlpAssert(expfnames == NULL ? depth == 0 : expfnames->depth == depth || expfnames->depth + 1 == depth);
    548547        while (expfnames && expfnames->depth >= depth)
    549548            expfnames = psh->expfnames = expfnames->prev;
Note: See TracChangeset for help on using the changeset viewer.