comparison src/channel.c @ 13674:1feeefd8cddb v8.0.1709

patch 8.0.1709: some non-C89 code may slip through commit https://github.com/vim/vim/commit/2e324950b83fcdf60843b54a6a339183370f338a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 14 14:37:07 2018 +0200 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)
author Christian Brabandt <cb@256bit.org>
date Sat, 14 Apr 2018 14:45:06 +0200
parents ab89131d30e0
children f309afff6f25
comparison
equal deleted inserted replaced
13673:24336952ffcf 13674:1feeefd8cddb
670 return NULL; 670 return NULL;
671 } 671 }
672 { 672 {
673 char *p; 673 char *p;
674 674
675 /* When using host->h_addr directly ubsan warns for it to not be 675 /* When using host->h_addr_list[0] directly ubsan warns for it to not
676 * aligned. First copy the pointer to aviod that. */ 676 * be aligned. First copy the pointer to avoid that. */
677 memcpy(&p, &host->h_addr, sizeof(p)); 677 memcpy(&p, &host->h_addr_list[0], sizeof(p));
678 memcpy((char *)&server.sin_addr, p, host->h_length); 678 memcpy((char *)&server.sin_addr, p, host->h_length);
679 } 679 }
680 680
681 /* On Mac and Solaris a zero timeout almost never works. At least wait 681 /* On Mac and Solaris a zero timeout almost never works. At least wait
682 * one millisecond. Let's do it for all systems, because we don't know why 682 * one millisecond. Let's do it for all systems, because we don't know why