mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
fix warnings: using the result of an assignment as a condition without parentheses [-Wparentheses]
Don't unnecessarily assign to variables within the *boolean* expression of a conditional. Signed-off-by: Giel van Schijndel <me@mortis.eu>
This commit is contained in:
parent
ecf1c79aad
commit
f85c097449
@ -760,8 +760,8 @@ string GetPidFile()
|
||||
|
||||
void CreatePidFile(string pidFile, pid_t pid)
|
||||
{
|
||||
FILE* file;
|
||||
if (file = fopen(pidFile.c_str(), "w"))
|
||||
FILE* file = fopen(pidFile.c_str(), "w");
|
||||
if (file)
|
||||
{
|
||||
fprintf(file, "%d\n", pid);
|
||||
fclose(file);
|
||||
@ -790,7 +790,9 @@ void ShrinkDebugFile()
|
||||
fseek(file, -sizeof(pch), SEEK_END);
|
||||
int nBytes = fread(pch, 1, sizeof(pch), file);
|
||||
fclose(file);
|
||||
if (file = fopen(strFile.c_str(), "w"))
|
||||
|
||||
file = fopen(strFile.c_str(), "w");
|
||||
if (file)
|
||||
{
|
||||
fwrite(pch, 1, nBytes, file);
|
||||
fclose(file);
|
||||
|
Loading…
Reference in New Issue
Block a user