On Tue, Aug 4, 2015 at 7:56 PM, walt <w41...@gmail.com> 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) <this notation makes sense to me> > r = sd_dhcp_lease_get_hostname(lease, &hostname); <this doesn't> > > 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.