diff options
author | Paul Smith <psmith@gnu.org> | 2009-09-16 17:07:01 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2009-09-16 17:07:01 +0000 |
commit | 6e57418f74e81d1385d41d0dc239fb608526be52 (patch) | |
tree | 78e7e64f0c47dff023bebe15ee57b85f8db6a826 /vmsfunctions.c | |
parent | 580b4c5cc99fc5e04b5bd314d1e4c4cd7e13a35c (diff) | |
download | make-6e57418f74e81d1385d41d0dc239fb608526be52.tar.gz |
- Add xcalloc() and call it
- Fix memory errors found by valgrind
- Remove multi_glob() and empower parse_file_seq() to do its job:
the goal here is to remove the confusing reverse/re-reverse we do on
the file lists: needed for future fixes.
- Add a prefix arg to parse_file_seq()
- Make concat() variadic so it can take arbitrary #'s of strings
Diffstat (limited to 'vmsfunctions.c')
-rw-r--r-- | vmsfunctions.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vmsfunctions.c b/vmsfunctions.c index 51a270e1..2c87cb72 100644 --- a/vmsfunctions.c +++ b/vmsfunctions.c @@ -34,13 +34,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ DIR * opendir (char *dspec) { - struct DIR *dir = (struct DIR *)xmalloc (sizeof (struct DIR)); - struct NAM *dnam = (struct NAM *)xmalloc (sizeof (struct NAM)); + struct DIR *dir = xcalloc (sizeof (struct DIR)); + struct NAM *dnam = xmalloc (sizeof (struct NAM)); struct FAB *dfab = &dir->fab; char *searchspec = xmalloc (MAXNAMLEN + 1); - memset (dir, 0, sizeof *dir); - *dfab = cc$rms_fab; *dnam = cc$rms_nam; sprintf (searchspec, "%s*.*;", dspec); |