From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7B07E1395ED for ; Wed, 5 Aug 2015 01:41:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55638141A5; Wed, 5 Aug 2015 01:41:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4103114162 for ; Wed, 5 Aug 2015 01:41:35 +0000 (UTC) Received: from mail-ig0-f179.google.com (mail-ig0-f179.google.com [209.85.213.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 819803409E2 for ; Wed, 5 Aug 2015 01:41:34 +0000 (UTC) Received: by iggf3 with SMTP id f3so23512173igg.1 for ; Tue, 04 Aug 2015 18:41:32 -0700 (PDT) X-Received: by 10.50.72.6 with SMTP id z6mr8051382igu.65.1438738892468; Tue, 04 Aug 2015 18:41:32 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.107.27.17 with HTTP; Tue, 4 Aug 2015 18:41:13 -0700 (PDT) In-Reply-To: <20150804165656.6636ef22@a6> References: <20150802080311.6f8cf586@a6> <20150803184122.4d3a68e1@a6> <55c05979369a7_756f11b730cc2@TP_L520.notmuch> <20150804165656.6636ef22@a6> From: Mike Gilbert Date: Tue, 4 Aug 2015 21:41:13 -0400 Message-ID: Subject: Re: [gentoo-user] Re: systemd-224 Look out for new networking behavior [FIXED] To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: a9ed86b3-af74-4fb6-8710-4fb87fce5b59 X-Archives-Hash: 463df29b02dffb1d99ab4a813cb71a37 On Tue, Aug 4, 2015 at 7:56 PM, walt wrote: > Let me give you one more example of syntax that I find unreasonable, > and then I'll ask my *real* question, about which I hope you will have > opinions. > > Okay, the statement I referred to above uses this notation: > > if (!link->network->hostname) > r = sd_dhcp_lease_get_hostname(lease, &hostname); > > In this context does '&hostname' mean a-pointer-to-a-pointer-to-the- > charstring we actually need? > > Doesn't this code seem needlessly complicated? Nope, looks like standard C to me. If you want a function to update an argument, you need to pass a pointer to said argument. If you want to update a pointer, you need to pass a pointer to a pointer.