Chromium Code Reviews| Index: base/sys_info_posix.cc |
| diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc |
| index 85ae039118986d211ea3964e38f271c4beb3a026..0ed9065ef9f03d4890856652490f8c2ee95c91b4 100644 |
| --- a/base/sys_info_posix.cc |
| +++ b/base/sys_info_posix.cc |
| @@ -113,8 +113,8 @@ std::string SysInfo::OperatingSystemName() { |
| #if !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| // static |
| std::string SysInfo::OperatingSystemVersion() { |
| - struct utsname info; |
| - if (uname(&info) < 0) { |
| + static struct utsname info = {}; |
| + if (!strlen(info.release) && uname(&info) < 0) { |
|
piman
2016/05/06 19:53:11
This is not thread safe. Why the change?
Julien Isorce Samsung
2016/05/07 08:18:13
Txh for pointing that, well I made this change bec
|
| NOTREACHED(); |
| return std::string(); |
| } |