aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/closedir.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/closedir.c')
-rw-r--r--com32/lib/closedir.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/com32/lib/closedir.c b/com32/lib/closedir.c
index dcf17049..9e43dd4d 100644
--- a/com32/lib/closedir.c
+++ b/com32/lib/closedir.c
@@ -16,15 +16,13 @@ int closedir(DIR * dir)
int rv = -1;
if (dir) {
- /*
- com32sys_t regs;
- memset(&regs, 0, sizeof regs);
- regs.eax.w[0] = 0x0022;
- regs.esi.l = OFFS_WRT(dir, 0);
- __com32.cs_intcall(0x22, &regs, &regs);
- */
- free(dir);
- rv = 0;
+ com32sys_t regs;
+ memset(&regs, 0, sizeof regs);
+ regs.eax.w[0] = 0x0022;
+ regs.esi.l = (uint32_t)dir;
+ __com32.cs_intcall(0x22, &regs, &regs);
+ free(dir);
+ rv = 0;
}
return rv;