src/lib: Move assignment out of if condition
Fix the following error detected by checkpatch: ERROR: do not use assignment in if condition TEST=Build and run on Galileo Gen2 Change-Id: I5a08d1647db66bd5d480f81e90d473999c222acf Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18761 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
@ -496,7 +496,8 @@ gcov_exit(void)
|
||||
if (length != GCOV_TAG_SUMMARY_LENGTH)
|
||||
goto read_mismatch;
|
||||
gcov_read_summary(&tmp);
|
||||
if ((error = gcov_is_error()))
|
||||
error = gcov_is_error();
|
||||
if (error)
|
||||
goto read_error;
|
||||
if (summary_pos
|
||||
|| tmp.checksum != crc32)
|
||||
@ -584,7 +585,8 @@ gcov_exit(void)
|
||||
ci_ptr->num);
|
||||
ci_ptr++;
|
||||
}
|
||||
if ((error = gcov_is_error()))
|
||||
error = gcov_is_error();
|
||||
if (error)
|
||||
goto read_error;
|
||||
}
|
||||
|
||||
@ -713,7 +715,8 @@ read_fatal:;
|
||||
fn_buffer = free_fn_data(gi_ptr, fn_buffer,
|
||||
GCOV_COUNTERS);
|
||||
|
||||
if ((error = gcov_close()))
|
||||
error = gcov_close();
|
||||
if (error)
|
||||
fprintf(stderr, error < 0 ?
|
||||
"profiling:%s:Overflow writing\n" :
|
||||
"profiling:%s:Error writing\n",
|
||||
|
Reference in New Issue
Block a user