> From: "Jack Bates" <[email protected]>
> On 09/07/13 01:50 AM, Pavel Simerda wrote:
> > Hi,
> >
> > +1 from me with a couple of minor issues:
> 
> Thank you Pavel, I attempted to address the issues:
> 
> > * Name *i* is good enough for an integer counter.
> 
> There are already some loops using *i* and if I'm not mistaken, they
> would conflict. The patch nests existing loops (searches and domains) in
> a new loop (nameservers). Do you have other advice for this integer counter?

I tend to just use i, j, k, but that's not a real issue.

> > * We usually use 'nnameservers' and the like, not 'n_nameserver'.
> 
> Fixed. I updated the patch:
> 
>     http://nottheoilrig.com/networkmanager/201307090/perdomain.patch
> 
> > * I recommend using in_addr_t (or guint32) as we do in most of the code for
> > IPv4 addresses instead of struct in_addr.
> 
> The existing code invokes inet_ntop to format the address as a string,
> and I think inet_ntop expects an in_addr struct. Is there a preferred
> way to format an ip4 address as a string? (I took a quick look through
> the code but didn't find an alternative way.)

Actually, you can just typecast in_addr_t to struct in_addr and vice versa, as 
the latter is technically just a structure containing the former. And in the 
case of inet_ntop, you don't even need to typecast as it expect void *.
_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to