diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-14 14:37:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-14 14:37:07 +0200 |
commit | 2e324950b83fcdf60843b54a6a339183370f338a (patch) | |
tree | c80a94cf7de8b07ad87c83d2188e83620df86cb0 /src/channel.c | |
parent | 78a16b0f2a142aae1fdc96c50ab0f25194d0e755 (diff) |
patch 8.0.1709: some non-C89 code may slip throughv8.0.1709
Problem: Some non-C89 code may slip through.
Solution: Enforce C89 in configure. Fix detected problems. (James McCoy,
closes #2735)
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c index a25e9fe9c8..f5d86ed057 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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); } |