1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-27 17:12:42 +00:00

Replaces magic number 2 with BYTESPER_DLWORD in calculation of buffer size.

This commit is contained in:
Nick Briggs
2025-07-26 22:09:14 -07:00
parent c4752e6caa
commit ce20b3520e
2 changed files with 4 additions and 4 deletions

View File

@@ -468,7 +468,7 @@ LispPTR ether_get(LispPTR args[])
log_debug(("ether_get() - begin\n"));
target = (u_char *)NativeAligned2FromLAddr(args[1]);
maxByteCount = 2 * LispIntToCInt(args[0]); /* words to bytes */
maxByteCount = BYTESPER_DLWORD * LispIntToCInt(args[0]); /* words to bytes */
log_debug((" target = %p maxBytecount: %d bytes\n", (void *)target, maxByteCount));
ether_buf = target;
@@ -501,7 +501,7 @@ LispPTR ether_send(LispPTR args[])
log_debug(("ether_send() - begin\n"));
u_char *source = (u_char *)NativeAligned2FromLAddr(args[1]);
int byteCount = 2 * LispIntToCInt(args[0]); /* words to bytes */
int byteCount = BYTESPER_DLWORD * LispIntToCInt(args[0]); /* words to bytes */
log_debug((" source = %p , bytecount: %d bytes\n", (void *)source, byteCount));

View File

@@ -366,7 +366,7 @@ LispPTR ether_get(LispPTR args[])
LispPTR MaxByteCount;
sigset_t signals;
MaxByteCount = 2 * (0xFFFF & args[0]); /* words to bytes */
MaxByteCount = BYTERSPER_DLWORD * (0xFFFF & args[0]); /* words to bytes */
DBPRINT(("Ether Get. "));
@@ -408,7 +408,7 @@ LispPTR ether_send(LispPTR args[])
LispPTR MaxByteCount;
u_char *BufferAddr; /* buffer address pointer(in native address) */
MaxByteCount = 2 * (0xFFFF & args[0]); /* words to bytes */
MaxByteCount = BYTESPER_DLWORD * (0xFFFF & args[0]); /* words to bytes */
BufferAddr = (u_char *)NativeAligned2FromLAddr(args[1]);
if (ether_fd > 0) {