summaryrefslogtreecommitdiff
path: root/gio/gunixfdmessage.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2010-01-05 18:49:23 -0500
committerRyan Lortie <desrt@desrt.ca>2010-01-05 18:52:33 -0500
commitbaf20e09842a97c2d7925dff5ff9c6d35e36b27d (patch)
tree460323e3d002dd4c06d4e027ee095699e6a7959c /gio/gunixfdmessage.c
parentb00c6d7fb5798b4e528554e1221a553ab95506ed (diff)
downloadglib-baf20e09842a97c2d7925dff5ff9c6d35e36b27d.tar.gz
GUnixFDMessage: fix a small typo in an extra check
In the deserialise function, GUnixFDMessage was comparing 'level' to both SOL_SOCKET and SCM_RIGHTS. It is correct to compare 'type' to SCM_RIGHTS. The code passed tests only because: 1) it's a "should always be OK" double-check 2) SOL_SOCKET and SCM_RIGHTS, by chance, both have the value '1' on Linux systems.
Diffstat (limited to 'gio/gunixfdmessage.c')
-rw-r--r--gio/gunixfdmessage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gio/gunixfdmessage.c b/gio/gunixfdmessage.c
index 9ca497ebd..bb37d5f59 100644
--- a/gio/gunixfdmessage.c
+++ b/gio/gunixfdmessage.c
@@ -84,7 +84,7 @@ g_unix_fd_message_deserialize (int level,
gint *fds;
if (level != SOL_SOCKET ||
- level != SCM_RIGHTS)
+ type != SCM_RIGHTS)
return NULL;
if (size % 4 > 0)