gsocket: test if family is <= 0, not < 0
authorDan Winship <danw@gnome.org>
Wed, 25 Apr 2012 14:44:55 +0000 (10:44 -0400)
committerDan Winship <danw@gnome.org>
Wed, 25 Apr 2012 14:46:44 +0000 (10:46 -0400)
commit87cc77a1985efa18bcd8fc3318c90d8557ae9129
tree73d371e5c16519123b8d2054d9284be999d611e2
parent56bcba11dd2d2b679efeebcf78f0f5736ba311e1
gsocket: test if family is <= 0, not < 0

If all members of GSocketFamily are supported on the platform, then
all of its values will be positive, and so the enum might become
unsigned, in which case testing for "family < 0" might cause warnings.
But we want to return an error if family == 0 (aka
G_SOCKET_FAMILY_INVALID) anyway, so just tweak the test accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=674592
gio/gsocket.c