Bug 1016631 - Cosmetic fix to use correct type for sysctl()'s 2nd argument. Also s/NULL/nullptr/ style fix in my code. r=gcp, r=vladan

This commit is contained in:
Jan Beich 2014-05-28 18:11:00 -04:00
parent c0e1b525ed
commit b4bfd61709
2 changed files with 4 additions and 4 deletions

View File

@ -431,10 +431,10 @@ nsresult LoadInfo::UpdateSystemLoad()
CTL_KERN,
KERN_CP_TIME,
};
size_t miblen = sizeof(mib) / sizeof(mib[0]);
if (sysctl(mib, miblen, &cp_time, &sz, NULL, 0)) {
u_int miblen = sizeof(mib) / sizeof(mib[0]);
if (sysctl(mib, miblen, &cp_time, &sz, nullptr, 0)) {
#else
if (sysctlbyname("kern.cp_time", &cp_time, &sz, NULL, 0)) {
if (sysctlbyname("kern.cp_time", &cp_time, &sz, nullptr, 0)) {
#endif // KERN_CP_TIME
LOG(("sysctl kern.cp_time failed"));
return NS_ERROR_FAILURE;

View File

@ -188,7 +188,7 @@ nsDebugImpl::GetIsDebuggerAttached(bool* aResult)
1,
#endif
};
size_t mibSize = sizeof(mib) / sizeof(int);
u_int mibSize = sizeof(mib) / sizeof(int);
KINFO_PROC info;
size_t infoSize = sizeof(info);