From f8be820925db67015e2643dc643fff855be08eeb Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Sun, 23 May 2004 21:18:37 +0000 Subject: [PATCH] Clear up confusing (void *)n using a macro. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@952 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/dosfns.c | 3 +-- kernel/proto.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/dosfns.c b/kernel/dosfns.c index dbbd8bd..ca4639b 100644 --- a/kernel/dosfns.c +++ b/kernel/dosfns.c @@ -231,8 +231,7 @@ long DosRWSft(int sft_idx, size_t n, void FAR * bp, int mode) lpCurSft = s; current_filepos = s->sft_posit; /* needed for MSCDEX */ dta = bp; - XferCount = network_redirector_mx(mode == XFR_READ ? REM_READ : REM_WRITE, - s, (void *)n); + XferCount = remote_rw(mode == XFR_READ ? REM_READ : REM_WRITE, s, n); dta = save_dta; return XferCount; } diff --git a/kernel/proto.h b/kernel/proto.h index 79bf6f5..079e6b0 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -380,6 +380,7 @@ COUNT truename(const char FAR * src, char * dest, COUNT t); int network_redirector(unsigned cmd); int network_redirector_fp(unsigned cmd, void far *s); long ASMPASCAL network_redirector_mx(unsigned cmd, void far *s, void *arg); +#define remote_rw(cmd,s,arg) (int)network_redirector_mx(cmd, s, (void *)arg) #define remote_getfree(s,d) (int)network_redirector_mx(REM_GETSPACE, s, d) #define remote_lseek(s,new_pos) network_redirector_mx(REM_LSEEK, s, &new_pos) #define remote_setfattr(attr) (int)network_redirector_mx(REM_SETATTR, NULL, (void *)attr)