forked from aniani/vim
patch 8.0.1709: some non-C89 code may slip through
Problem: Some non-C89 code may slip through. Solution: Enforce C89 in configure. Fix detected problems. (James McCoy, closes #2735)
This commit is contained in:
@@ -672,9 +672,9 @@ channel_open(
|
||||
{
|
||||
char *p;
|
||||
|
||||
/* When using host->h_addr directly ubsan warns for it to not be
|
||||
* aligned. First copy the pointer to aviod that. */
|
||||
memcpy(&p, &host->h_addr, sizeof(p));
|
||||
/* When using host->h_addr_list[0] directly ubsan warns for it to not
|
||||
* be aligned. First copy the pointer to avoid that. */
|
||||
memcpy(&p, &host->h_addr_list[0], sizeof(p));
|
||||
memcpy((char *)&server.sin_addr, p, host->h_length);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user