Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: webrtc/rtc_base/macutils.cc

Issue 2988153003: Replace CHECK(x && y) with two separate CHECK() calls (Closed)
Patch Set: fix mistakes Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/pc/test/fakertccertificategenerator.h ('k') | webrtc/rtc_base/opensslstreamadapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2007 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2007 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (printable) { 65 if (printable) {
66 ss << '\''; 66 ss << '\'';
67 } else { 67 } else {
68 ss.str(""); 68 ss.str("");
69 ss << "0x" << std::hex << fc; 69 ss << "0x" << std::hex << fc;
70 } 70 }
71 out->append(ss.str()); 71 out->append(ss.str());
72 } 72 }
73 73
74 static bool GetOSVersion(int* major, int* minor, int* bugfix) { 74 static bool GetOSVersion(int* major, int* minor, int* bugfix) {
75 RTC_DCHECK(major && minor && bugfix); 75 RTC_DCHECK(major);
76 RTC_DCHECK(minor);
77 RTC_DCHECK(bugfix);
76 struct utsname uname_info; 78 struct utsname uname_info;
77 if (uname(&uname_info) != 0) 79 if (uname(&uname_info) != 0)
78 return false; 80 return false;
79 81
80 if (strcmp(uname_info.sysname, "Darwin") != 0) 82 if (strcmp(uname_info.sysname, "Darwin") != 0)
81 return false; 83 return false;
82 *major = 10; 84 *major = 10;
83 85
84 // The market version of macOS is always 4 lower than the internal version. 86 // The market version of macOS is always 4 lower than the internal version.
85 int minor_version = atoi(uname_info.release); 87 int minor_version = atoi(uname_info.release);
(...skipping 30 matching lines...) Expand all
116 case 7: 118 case 7:
117 return kMacOSLion; 119 return kMacOSLion;
118 case 8: 120 case 8:
119 return kMacOSMountainLion; 121 return kMacOSMountainLion;
120 case 9: 122 case 9:
121 return kMacOSMavericks; 123 return kMacOSMavericks;
122 } 124 }
123 return kMacOSNewer; 125 return kMacOSNewer;
124 } 126 }
125 } // namespace rtc 127 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/pc/test/fakertccertificategenerator.h ('k') | webrtc/rtc_base/opensslstreamadapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698