mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1314904 - uname() on success can return non-negative value (not just 0). r=bsmedberg
This commit is contained in:
parent
0024b052cb
commit
433839eccf
@ -105,8 +105,7 @@ nsUserInfo::GetDomain(char * *aDomain)
|
||||
struct utsname buf;
|
||||
char *domainname = nullptr;
|
||||
|
||||
// is this portable? that is a POSIX compliant call, but I need to check
|
||||
if (uname(&buf)) {
|
||||
if (uname(&buf) < 0) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ GfxInfo::GetData()
|
||||
// only useful for Linux kernel version check for FGLRX driver.
|
||||
// assumes X client == X server, which is sad.
|
||||
struct utsname unameobj;
|
||||
if (!uname(&unameobj))
|
||||
if (uname(&unameobj) >= 0)
|
||||
{
|
||||
mOS.Assign(unameobj.sysname);
|
||||
mOSRelease.Assign(unameobj.release);
|
||||
|
Loading…
Reference in New Issue
Block a user