summaryrefslogtreecommitdiff
path: root/vmsfunctions.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-09-16 17:07:01 +0000
committerPaul Smith <psmith@gnu.org>2009-09-16 17:07:01 +0000
commit8f30b68871bde8687c7fcff8bac66e2b5765129e (patch)
tree78e7e64f0c47dff023bebe15ee57b85f8db6a826 /vmsfunctions.c
parent5abe47762071f024409f7fd16c9cb76b31833379 (diff)
downloadgunmake-8f30b68871bde8687c7fcff8bac66e2b5765129e.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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/vmsfunctions.c b/vmsfunctions.c
index 51a270e..2c87cb7 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);