Gentoo Archives: gentoo-user

From: Mike Gilbert <floppym@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: systemd-224 Look out for new networking behavior [FIXED]
Date: Wed, 05 Aug 2015 01:41:42
Message-Id: CAJ0EP425Q9Z1Yz=fJeCaAXCqxFm1c6fBgxx1Xy7JeuYiVGxhsQ@mail.gmail.com
In Reply to: [gentoo-user] Re: systemd-224 Look out for new networking behavior [FIXED] by walt
1 On Tue, Aug 4, 2015 at 7:56 PM, walt <w41ter@×××××.com> wrote:
2 > Let me give you one more example of syntax that I find unreasonable,
3 > and then I'll ask my *real* question, about which I hope you will have
4 > opinions.
5 >
6 > Okay, the statement I referred to above uses this notation:
7 >
8 > if (!link->network->hostname) <this notation makes sense to me>
9 > r = sd_dhcp_lease_get_hostname(lease, &hostname); <this doesn't>
10 >
11 > In this context does '&hostname' mean a-pointer-to-a-pointer-to-the-
12 > charstring we actually need?
13 >
14 > Doesn't this code seem needlessly complicated?
15
16 Nope, looks like standard C to me. If you want a function to update an
17 argument, you need to pass a pointer to said argument. If you want to
18 update a pointer, you need to pass a pointer to a pointer.