diff --git a/src/ether_nethub.c b/src/ether_nethub.c index df27eec..e9803e2 100644 --- a/src/ether_nethub.c +++ b/src/ether_nethub.c @@ -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)); diff --git a/src/ether_sunos.c b/src/ether_sunos.c index deb4afe..ba75cf1 100644 --- a/src/ether_sunos.c +++ b/src/ether_sunos.c @@ -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) {