Bug 1046841 - Fix more style violations in previously touched .cpp files in xpcom/. r=froydnj

This commit is contained in:
Birunthan Mohanathas
2014-08-25 12:17:15 -07:00
parent 644ec64d07
commit 6e9ec233ed
48 changed files with 396 additions and 306 deletions

View File

@@ -129,7 +129,8 @@ nsDirEnumeratorUnix::~nsDirEnumeratorUnix()
Close();
}
NS_IMPL_ISUPPORTS(nsDirEnumeratorUnix, nsISimpleEnumerator, nsIDirectoryEnumerator)
NS_IMPL_ISUPPORTS(nsDirEnumeratorUnix, nsISimpleEnumerator,
nsIDirectoryEnumerator)
NS_IMETHODIMP
nsDirEnumeratorUnix::Init(nsLocalFile* aParent,
@@ -394,7 +395,7 @@ nsLocalFile::OpenNSPRFileDesc(int32_t aFlags, int32_t aMode,
PRFileDesc** aResult)
{
*aResult = PR_Open(mPath.get(), aFlags, aMode);
if (! *aResult) {
if (!*aResult) {
return NS_ErrorAccordingToNSPR();
}
@@ -415,7 +416,7 @@ NS_IMETHODIMP
nsLocalFile::OpenANSIFileDesc(const char* aMode, FILE** aResult)
{
*aResult = fopen(mPath.get(), aMode);
if (! *aResult) {
if (!*aResult) {
return NS_ERROR_FAILURE;
}
@@ -1407,7 +1408,8 @@ nsLocalFile::GetDiskSpaceAvailable(int64_t* aDiskSpaceAvailable)
&& dq.dqb_bhardlimit) {
int64_t QuotaSpaceAvailable = 0;
if (dq.dqb_bhardlimit > dq.dqb_curspace) {
QuotaSpaceAvailable = int64_t(fs_buf.F_BSIZE * (dq.dqb_bhardlimit - dq.dqb_curspace));
QuotaSpaceAvailable =
int64_t(fs_buf.F_BSIZE * (dq.dqb_bhardlimit - dq.dqb_curspace));
}
if (QuotaSpaceAvailable < *aDiskSpaceAvailable) {
*aDiskSpaceAvailable = QuotaSpaceAvailable;
@@ -1949,7 +1951,8 @@ nsLocalFile::SetPersistentDescriptor(const nsACString& aPersistentDescriptor)
Boolean changed;
FSRef resolvedFSRef;
OSErr err = ::FSResolveAlias(nullptr, (AliasHandle)newHandle, &resolvedFSRef, &changed);
OSErr err = ::FSResolveAlias(nullptr, (AliasHandle)newHandle, &resolvedFSRef,
&changed);
rv = MacErrorMapper(err);
DisposeHandle(newHandle);
@@ -1968,7 +1971,8 @@ nsLocalFile::Reveal()
{
#ifdef MOZ_WIDGET_GTK
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
nsCOMPtr<nsIGnomeVFSService> gnomevfs =
do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
if (!giovfs && !gnomevfs) {
return NS_ERROR_FAILURE;
}
@@ -1986,7 +1990,8 @@ nsLocalFile::Reveal()
{
return gnomevfs->ShowURIForInput(mPath);
}
} else if (giovfs && NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
} else if (giovfs &&
NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
return NS_OK;
} else {
nsCOMPtr<nsIFile> parentDir;
@@ -2022,7 +2027,8 @@ nsLocalFile::Launch()
{
#ifdef MOZ_WIDGET_GTK
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
nsCOMPtr<nsIGnomeVFSService> gnomevfs =
do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
if (giovfs) {
return giovfs->ShowURIForInput(mPath);
} else if (gnomevfs) {
@@ -2403,7 +2409,8 @@ nsLocalFile::GetFSSpec(FSSpec* aResult)
FSRef fsRef;
nsresult rv = GetFSRef(&fsRef);
if (NS_SUCCEEDED(rv)) {
OSErr err = ::FSGetCatalogInfo(&fsRef, kFSCatInfoNone, nullptr, nullptr, aResult, nullptr);
OSErr err = ::FSGetCatalogInfo(&fsRef, kFSCatInfoNone, nullptr, nullptr,
aResult, nullptr);
return MacErrorMapper(err);
}
@@ -2430,7 +2437,8 @@ nsLocalFile::GetFileSizeWithResFork(int64_t* aFileSizeWithResFork)
return MacErrorMapper(err);
}
*aFileSizeWithResFork = catalogInfo.dataLogicalSize + catalogInfo.rsrcLogicalSize;
*aFileSizeWithResFork =
catalogInfo.dataLogicalSize + catalogInfo.rsrcLogicalSize;
return NS_OK;
}