summaryrefslogtreecommitdiffstats
path: root/crypto/LPdir_win.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/LPdir_win.c')
-rw-r--r--crypto/LPdir_win.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/LPdir_win.c b/crypto/LPdir_win.c
index 07e63fb424..78a796de80 100644
--- a/crypto/LPdir_win.c
+++ b/crypto/LPdir_win.c
@@ -69,12 +69,12 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
return 0;
}
- *ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX));
+ *ctx = malloc(sizeof(**ctx));
if (*ctx == NULL) {
errno = ENOMEM;
return 0;
}
- memset(*ctx, '\0', sizeof(LP_DIR_CTX));
+ memset(*ctx, '\0', sizeof(**ctx));
if (directory[dirlen - 1] != '*') {
extdirbuf = (char *)malloc(dirlen + 3);