mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 12:52:29 +03:00
Replace deprecated bcopy() with memcpy().
The bcopy() function is POSIX-specific and deprecated. The recommended replacement (at least for non-overlapping source and destination ranges) is memcpy(), which is in the standard C library. Note that the source and destination parameters are in a different order between these two functions.
This commit is contained in:
parent
21a93421dc
commit
6a4943ca41
@ -46,7 +46,7 @@ struct LMClient {
|
||||
}
|
||||
|
||||
memset(&server, '\0', sizeof(server));
|
||||
bcopy(hp->h_addr, (char *)&server.sin_addr, hp->h_length);
|
||||
memcpy((char *)&server.sin_addr, hp->h_addr, hp->h_length);
|
||||
server.sin_family = hp->h_addrtype;
|
||||
server.sin_port = htons(port);
|
||||
|
||||
|
@ -47,7 +47,7 @@ bool LanguageModelRemote::start(const std::string& host, int port)
|
||||
}
|
||||
|
||||
memset(&server, '\0', sizeof(server));
|
||||
bcopy(hp->h_addr, (char *)&server.sin_addr, hp->h_length);
|
||||
memcpy((char *)&server.sin_addr, hp->h_addr, hp->h_length);
|
||||
server.sin_family = hp->h_addrtype;
|
||||
server.sin_port = htons(port);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user