mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-02 05:17:31 +09:00
Use -1 instead of 0 to indicate absent glxtest_pipe fd
This commit is contained in:
parent
f02ba306ef
commit
2871772641
1 changed files with 4 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// these global variables will be set when firing the glxtest process
|
// these global variables will be set when firing the glxtest process
|
||||||
int glxtest_pipe = 0;
|
int glxtest_pipe = -1;
|
||||||
pid_t glxtest_pid = 0;
|
pid_t glxtest_pid = 0;
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
|
@ -50,8 +50,8 @@ GfxInfo::GetData()
|
||||||
// to understand this function, see bug 639842. We retrieve the OpenGL driver information in a
|
// to understand this function, see bug 639842. We retrieve the OpenGL driver information in a
|
||||||
// separate process to protect against bad drivers.
|
// separate process to protect against bad drivers.
|
||||||
|
|
||||||
// if glxtest_pipe == 0, that means that we already read the information
|
// if glxtest_pipe == -1, that means that we already read the information
|
||||||
if (!glxtest_pipe)
|
if (glxtest_pipe == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
enum { buf_size = 1024 };
|
enum { buf_size = 1024 };
|
||||||
|
|
@ -60,7 +60,7 @@ GfxInfo::GetData()
|
||||||
&buf,
|
&buf,
|
||||||
buf_size-1); // -1 because we'll append a zero
|
buf_size-1); // -1 because we'll append a zero
|
||||||
close(glxtest_pipe);
|
close(glxtest_pipe);
|
||||||
glxtest_pipe = 0;
|
glxtest_pipe = -1;
|
||||||
|
|
||||||
// bytesread < 0 would mean that the above read() call failed.
|
// bytesread < 0 would mean that the above read() call failed.
|
||||||
// This should never happen. If it did, the outcome would be to blacklist anyway.
|
// This should never happen. If it did, the outcome would be to blacklist anyway.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue