summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNew Tobin Paradigm <email@mattatobin.com>2018-04-20 19:42:04 -0400
committerGitHub <noreply@github.com>2018-04-20 19:42:04 -0400
commitb3bf60f4264b9acfbd2cb34fed4a66915012803c (patch)
tree0d9032cfb468fcdbe85f4603b957d169a9a8fe1c
parentfc5870128f8c2ec5e03f7aa340d73b50756e07ec (diff)
parent2828e5db828d13ef662817f37f55709ab302db51 (diff)
downloadUXP-b3bf60f4264b9acfbd2cb34fed4a66915012803c.tar
UXP-b3bf60f4264b9acfbd2cb34fed4a66915012803c.tar.gz
UXP-b3bf60f4264b9acfbd2cb34fed4a66915012803c.tar.lz
UXP-b3bf60f4264b9acfbd2cb34fed4a66915012803c.tar.xz
UXP-b3bf60f4264b9acfbd2cb34fed4a66915012803c.zip
Merge pull request #223 from trav90/glxtest_pipe
Use -1 instead of 0 to indicate absent glxtest_pipe fd
-rw-r--r--widget/GfxInfoX11.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp
index 4297aaa93..48fc3dbb5 100644
--- a/widget/GfxInfoX11.cpp
+++ b/widget/GfxInfoX11.cpp
@@ -23,7 +23,7 @@ NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
#endif
// these global variables will be set when firing the glxtest process
-int glxtest_pipe = 0;
+int glxtest_pipe = -1;
pid_t glxtest_pid = 0;
nsresult
@@ -50,8 +50,8 @@ GfxInfo::GetData()
// to understand this function, see bug 639842. We retrieve the OpenGL driver information in a
// separate process to protect against bad drivers.
- // if glxtest_pipe == 0, that means that we already read the information
- if (!glxtest_pipe)
+ // if glxtest_pipe == -1, that means that we already read the information
+ if (glxtest_pipe == -1)
return;
enum { buf_size = 1024 };
@@ -60,7 +60,7 @@ GfxInfo::GetData()
&buf,
buf_size-1); // -1 because we'll append a zero
close(glxtest_pipe);
- glxtest_pipe = 0;
+ glxtest_pipe = -1;
// bytesread < 0 would mean that the above read() call failed.
// This should never happen. If it did, the outcome would be to blacklist anyway.