Changeset 3477 for trunk/src/kash/options.c
- Timestamp:
- Sep 17, 2020, 11:52:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/options.c
r3445 r3477 41 41 #endif 42 42 43 #include <assert.h>44 43 #include <stdlib.h> 45 44 … … 109 108 i++; 110 109 } 111 assert(psh->arg0 != NULL);110 kHlpAssert(psh->arg0 != NULL); 112 111 } 113 112 … … 131 130 psh->shellparam.reset = inherit->shellparam.reset; 132 131 psh->shellparam.nparam = left = inherit->shellparam.nparam; 133 assert(left >= 0);132 kHlpAssert(left >= 0); 134 133 psh->shellparam.p = (char **)ckmalloc(psh, (left + 1) * sizeof(psh->shellparam.p[0])); 135 134 psh->shellparam.p[left] = NULL; … … 142 141 if (inherit->shellparam.optnext) { 143 142 size_t idx = (size_t)(inherit->shellparam.optnext - inherit->shellparam.p); 144 assert(idx <= inherit->shellparam.nparam);143 kHlpAssert(idx <= inherit->shellparam.nparam); 145 144 if (idx <= inherit->shellparam.nparam) 146 145 psh->shellparam.optnext = &psh->shellparam.p[idx]; … … 169 168 off--; 170 169 } 171 assert(psh->shellparam.optptr != NULL);170 kHlpAssert(psh->shellparam.optptr != NULL); 172 171 } 173 172 … … 225 224 psh->shellparam.p = psh->argptr; 226 225 psh->shellparam.reset = 1; 227 /* assert(shellparam.malloc == 0 && shellparam.nparam == 0); */226 /* kHlpAssert(shellparam.malloc == 0 && shellparam.nparam == 0); */ 228 227 while (*psh->argptr) { 229 228 psh->shellparam.nparam++;
Note:
See TracChangeset
for help on using the changeset viewer.