mirror of
https://github.com/Interlisp/maiko.git
synced 2026-04-26 04:17:27 +00:00
Replaces magic number 2 with BYTESPER_DLWORD in calculation of buffer size.
This commit is contained in:
@@ -468,7 +468,7 @@ LispPTR ether_get(LispPTR args[])
|
|||||||
log_debug(("ether_get() - begin\n"));
|
log_debug(("ether_get() - begin\n"));
|
||||||
|
|
||||||
target = (u_char *)NativeAligned2FromLAddr(args[1]);
|
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));
|
log_debug((" target = %p maxBytecount: %d bytes\n", (void *)target, maxByteCount));
|
||||||
|
|
||||||
ether_buf = target;
|
ether_buf = target;
|
||||||
@@ -501,7 +501,7 @@ LispPTR ether_send(LispPTR args[])
|
|||||||
log_debug(("ether_send() - begin\n"));
|
log_debug(("ether_send() - begin\n"));
|
||||||
|
|
||||||
u_char *source = (u_char *)NativeAligned2FromLAddr(args[1]);
|
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));
|
log_debug((" source = %p , bytecount: %d bytes\n", (void *)source, byteCount));
|
||||||
|
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ LispPTR ether_get(LispPTR args[])
|
|||||||
LispPTR MaxByteCount;
|
LispPTR MaxByteCount;
|
||||||
sigset_t signals;
|
sigset_t signals;
|
||||||
|
|
||||||
MaxByteCount = 2 * (0xFFFF & args[0]); /* words to bytes */
|
MaxByteCount = BYTERSPER_DLWORD * (0xFFFF & args[0]); /* words to bytes */
|
||||||
|
|
||||||
DBPRINT(("Ether Get. "));
|
DBPRINT(("Ether Get. "));
|
||||||
|
|
||||||
@@ -408,7 +408,7 @@ LispPTR ether_send(LispPTR args[])
|
|||||||
LispPTR MaxByteCount;
|
LispPTR MaxByteCount;
|
||||||
u_char *BufferAddr; /* buffer address pointer(in native address) */
|
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]);
|
BufferAddr = (u_char *)NativeAligned2FromLAddr(args[1]);
|
||||||
|
|
||||||
if (ether_fd > 0) {
|
if (ether_fd > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user