1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-07 11:17:29 +00:00

Remove ToMem macro. (#120)

We can always use `memcpy` to copy from a `hostent` struct to a
`sockaddr_in` struct as they will not be overlapping.
This commit is contained in:
Bruce Mitchener
2020-12-23 13:57:40 +07:00
committed by GitHub
parent 8b67b6b75a
commit a6ef508a7c
2 changed files with 2 additions and 14 deletions

View File

@@ -46,12 +46,6 @@
#define MAX_HOSTNAME_LENGTH 100
#define UDP_DATA_BLOCK_SIZE 1000
#ifdef OS5
#define ToMem memmove
#else
#define ToMem memcpy
#endif /* OS5 */
LispPTR rpc(LispPTR *args)
{
#ifndef DOS
@@ -130,7 +124,7 @@ LispPTR rpc(LispPTR *args)
/* Resolve the host address. */
if (hp) {
sin1.sin_family = hp->h_addrtype;
ToMem((caddr_t)&sin1.sin_addr, hp->h_addr, hp->h_length);
memcpy((caddr_t)&sin1.sin_addr, hp->h_addr, hp->h_length);
} else
goto handle_error;