chiark / gitweb /
barrier: fix up constructor error handling
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 2 Oct 2014 06:31:28 +0000 (08:31 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 2 Oct 2014 06:40:43 +0000 (08:40 +0200)
We cannot rely on "errno" to be non-zero on failure, if we perform
multiple glibc calls. That is, if the first eventfd() call fails, but the
second succeeds, we cleanup the barrier but return 0.

Fix this by always testing the return value immediately. This should also
fix all the coverity warnings.


No differences found