From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48758 invoked by alias); 6 Oct 2016 11:04:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 48736 invoked by uid 89); 6 Oct 2016 11:04:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Subject: Re: [RFC PATCH 2/2] getaddrinfo: Add AF_VSOCK support To: Stefan Hajnoczi References: <1475144848-4446-1-git-send-email-stefanha@redhat.com> <1475144848-4446-3-git-send-email-stefanha@redhat.com> Cc: libc-alpha@sourceware.org, Jorgen Hansen From: Florian Weimer Message-ID: <0f3008db-7aa5-af15-bff7-1c0a989b4e48@redhat.com> Date: Thu, 06 Oct 2016 11:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1475144848-4446-3-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-10/txt/msg00128.txt.bz2 On 09/29/2016 12:27 PM, Stefan Hajnoczi wrote: > + ai = *pai = malloc (sizeof (struct addrinfo) + sizeof (struct sockaddr_vm)); You should define a local struct type for this, to make it more obvious that you got the alignment correct. > + ai->ai_addr = (void *) (ai + 1); Then you can avoid this pointer arithmetic as well. If we decide to add this functionality, we'll need tests for it. Florian