Bug 1356843 - Fix -Wcomma warning in modules/libjar/nsZipArchive.cpp. r=aklotz

clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements or to call a function for side effects within an expression.

modules/libjar/nsZipArchive.cpp:651:25 [-Wcomma] possible misuse of comma operator here

MozReview-Commit-ID: 9PjB915D81f

--HG--
extra : rebase_source : c494c2f4a8291d6c08f02765e988c1fd14079e54
extra : source : 3643e37b615c4461b6a9359856731252acc36465
This commit is contained in:
Chris Peterson 2017-03-27 21:39:36 -07:00
Родитель 9e037cb5e9
Коммит 870028fdbf
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -642,10 +642,13 @@ static nsresult ResolveSymlink(const char *path)
int32_t length = PR_Read(fIn, (void*)buf, PATH_MAX); int32_t length = PR_Read(fIn, (void*)buf, PATH_MAX);
PR_Close(fIn); PR_Close(fIn);
if ( (length <= 0) if (length <= 0) {
|| ((buf[length] = 0, PR_Delete(path)) != 0) return NS_ERROR_FILE_DISK_FULL;
|| (symlink(buf, path) != 0)) }
{
buf[length] = '\0';
if (PR_Delete(path) != 0 || symlink(buf, path) != 0) {
return NS_ERROR_FILE_DISK_FULL; return NS_ERROR_FILE_DISK_FULL;
} }
return NS_OK; return NS_OK;