Re: [patch NetworkManager] ifcfg-rh: reader: allow device to do not have ipv4 setting.

On 08/22/2013 03:44 AM, Jiri Pirko wrote:
Should be split onto two lines. Also, we don't generally use "gchar"
(just use "char"), and there's no particular reason to use gint32 rather
than int here. (I see that there are some existing gint32s in that
file... I have no idea why.)

With this I always try to be conform with the rest of the code.
Since tag_name is put as a parameter to g_strdup, which has gchar * in
its prototype, I'm using gchar.

FYI, it's 100% guaranteed that "gchar" is just a typedef for "char", on
all platforms, always. "gchar" mostly only exists for
parallelism/completeness/aesthetics, to complement "guchar" (which is
actually useful because it's much less typing than "unsigned char").

glib and gtk still use "gchar", but almost everyone else gave up on them
long ago and just use "char" everywhere.

Hm... so this function does the same thing as the code it replaced, but
I'm not sure why the old code did it that way... if there's just a
PREFIX, but no IPADDR, then that shouldn't count as "an IP4 address is
defined". Maybe dcbw will have some insight on this when he gets back.

I'm just following the original code. If you want to change the
behaviour, I suggest to do it in separate patch.

Sure, I was just noticing it and wanted to point it out as something we
should look at later.

-- Dan

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]