gwakeup: Clarify buffer sizing in g_wakeup_signal()
authorPhilip Withnall <philip@tecnocode.co.uk>
Sat, 21 Jun 2014 09:48:08 +0000 (10:48 +0100)
committerPhilip Withnall <philip@tecnocode.co.uk>
Sat, 21 Jun 2014 16:41:31 +0000 (17:41 +0100)
commit6b8ae8f21b909102b4279900e90cb294cf542188
tree37c77a3d83d3437c7cb837b04f665aa245f9f869
parenteb6da409fa904d99ec6c62718f366e3a70033881
gwakeup: Clarify buffer sizing in g_wakeup_signal()

The code in g_wakeup_signal() is currently correct: it writes a 64-bit
counter increment value if the FD is an eventfd, and writes an arbitrary
8-bit value if using a normal pipe.

However, the reasoning behind these buffer sizes is not clear, and the
mismatch between the allocated buffer size and the length passed to
write() in the pipe case could be mistaken for a bug.

Coverity issue: #1159490

https://bugzilla.gnome.org/show_bug.cgi?id=732002
glib/gwakeup.c