summaryrefslogtreecommitdiff
path: root/vmsfunctions.c
diff options
context:
space:
mode:
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);