diff options
author | Paul Smith <psmith@gnu.org> | 2019-05-11 10:43:53 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2019-05-12 16:28:26 -0400 |
commit | 1710573272f0063bc5e0109203c467bf9c44d944 (patch) | |
tree | fb686724e2c79ebe6af37f72d3db310a92189b0d /src/variable.c | |
parent | 80ca781adfb6f2ea447fac8ad9b06a8da7a16076 (diff) | |
download | make-git-1710573272f0063bc5e0109203c467bf9c44d944.tar.gz |
* variable.c (define_variable_in_set): Clear new structs
Diffstat (limited to 'src/variable.c')
-rw-r--r-- | src/variable.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/variable.c b/src/variable.c index 11acbdfe..53ce62fa 100644 --- a/src/variable.c +++ b/src/variable.c @@ -267,7 +267,7 @@ define_variable_in_set (const char *name, size_t length, /* Create a new variable definition and add it to the hash table. */ - v = xmalloc (sizeof (struct variable)); + v = xcalloc (sizeof (struct variable)); v->name = xstrndup (name, length); v->length = (unsigned int) length; hash_insert_at (&set->table, v, var_slot); @@ -277,18 +277,10 @@ define_variable_in_set (const char *name, size_t length, v->value = xstrdup (value); if (flocp != 0) v->fileinfo = *flocp; - else - v->fileinfo.filenm = 0; v->origin = origin; v->recursive = recursive; - v->special = 0; - v->expanding = 0; - v->exp_count = 0; - v->per_target = 0; - v->append = 0; - v->private_var = 0; - v->export = v_default; + v->export = v_default; v->exportable = 1; if (*name != '_' && (*name < 'A' || *name > 'Z') && (*name < 'a' || *name > 'z')) |