fix "aloc" -> "alloc" typos
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
7bc3d39695
commit
7373759947
@ -114,7 +114,7 @@ static VALUE *int_value(arith_t i)
|
|||||||
VALUE *v;
|
VALUE *v;
|
||||||
|
|
||||||
v = xzalloc(sizeof(VALUE));
|
v = xzalloc(sizeof(VALUE));
|
||||||
if (INTEGER) /* otherwise xzaaloc did it already */
|
if (INTEGER) /* otherwise xzalloc did it already */
|
||||||
v->type = INTEGER;
|
v->type = INTEGER;
|
||||||
v->u.i = i;
|
v->u.i = i;
|
||||||
return v;
|
return v;
|
||||||
@ -127,7 +127,7 @@ static VALUE *str_value(const char *s)
|
|||||||
VALUE *v;
|
VALUE *v;
|
||||||
|
|
||||||
v = xzalloc(sizeof(VALUE));
|
v = xzalloc(sizeof(VALUE));
|
||||||
if (STRING) /* otherwise xzaaloc did it already */
|
if (STRING) /* otherwise xzalloc did it already */
|
||||||
v->type = STRING;
|
v->type = STRING;
|
||||||
v->u.s = xstrdup(s);
|
v->u.s = xstrdup(s);
|
||||||
return v;
|
return v;
|
||||||
|
@ -247,7 +247,7 @@ typedef struct grep_list_data_t {
|
|||||||
#endif
|
#endif
|
||||||
#define ALLOCATED 1
|
#define ALLOCATED 1
|
||||||
#define COMPILED 2
|
#define COMPILED 2
|
||||||
int flg_mem_alocated_compiled;
|
int flg_mem_allocated_compiled;
|
||||||
} grep_list_data_t;
|
} grep_list_data_t;
|
||||||
|
|
||||||
#if !ENABLE_EXTRA_COMPAT
|
#if !ENABLE_EXTRA_COMPAT
|
||||||
@ -380,8 +380,8 @@ static int grep_file(FILE *file)
|
|||||||
#endif
|
#endif
|
||||||
char *match_at;
|
char *match_at;
|
||||||
|
|
||||||
if (!(gl->flg_mem_alocated_compiled & COMPILED)) {
|
if (!(gl->flg_mem_allocated_compiled & COMPILED)) {
|
||||||
gl->flg_mem_alocated_compiled |= COMPILED;
|
gl->flg_mem_allocated_compiled |= COMPILED;
|
||||||
#if !ENABLE_EXTRA_COMPAT
|
#if !ENABLE_EXTRA_COMPAT
|
||||||
xregcomp(&gl->compiled_regex, gl->pattern, reflags);
|
xregcomp(&gl->compiled_regex, gl->pattern, reflags);
|
||||||
#else
|
#else
|
||||||
@ -619,9 +619,9 @@ static char *add_grep_list_data(char *pattern)
|
|||||||
grep_list_data_t *gl = xzalloc(sizeof(*gl));
|
grep_list_data_t *gl = xzalloc(sizeof(*gl));
|
||||||
gl->pattern = pattern;
|
gl->pattern = pattern;
|
||||||
#if ENABLE_FEATURE_CLEAN_UP
|
#if ENABLE_FEATURE_CLEAN_UP
|
||||||
gl->flg_mem_alocated_compiled = flg_used_mem;
|
gl->flg_mem_allocated_compiled = flg_used_mem;
|
||||||
#else
|
#else
|
||||||
/*gl->flg_mem_alocated_compiled = 0;*/
|
/*gl->flg_mem_allocated_compiled = 0;*/
|
||||||
#endif
|
#endif
|
||||||
return (char *)gl;
|
return (char *)gl;
|
||||||
}
|
}
|
||||||
@ -837,9 +837,9 @@ int grep_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
grep_list_data_t *gl = (grep_list_data_t *)pattern_head_ptr->data;
|
grep_list_data_t *gl = (grep_list_data_t *)pattern_head_ptr->data;
|
||||||
|
|
||||||
pattern_head = pattern_head->link;
|
pattern_head = pattern_head->link;
|
||||||
if (gl->flg_mem_alocated_compiled & ALLOCATED)
|
if (gl->flg_mem_allocated_compiled & ALLOCATED)
|
||||||
free(gl->pattern);
|
free(gl->pattern);
|
||||||
if (gl->flg_mem_alocated_compiled & COMPILED)
|
if (gl->flg_mem_allocated_compiled & COMPILED)
|
||||||
regfree(&gl->compiled_regex);
|
regfree(&gl->compiled_regex);
|
||||||
free(gl);
|
free(gl);
|
||||||
free(pattern_head_ptr);
|
free(pattern_head_ptr);
|
||||||
|
@ -11663,7 +11663,7 @@ parsebackq: {
|
|||||||
* FIXME: this can allocate very large block on stack and SEGV.
|
* FIXME: this can allocate very large block on stack and SEGV.
|
||||||
* Example:
|
* Example:
|
||||||
* echo "..<100kbytes>..`true` $(true) `true` ..."
|
* echo "..<100kbytes>..`true` $(true) `true` ..."
|
||||||
* alocates 100kb for every command subst. With about
|
* allocates 100kb for every command subst. With about
|
||||||
* a hundred command substitutions stack overflows.
|
* a hundred command substitutions stack overflows.
|
||||||
* With larger prepended string, SEGV happens sooner.
|
* With larger prepended string, SEGV happens sooner.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user