Skip to content

Commit

Permalink
src: remove superfluous check in backtrace_posix.cc
Browse files Browse the repository at this point in the history
The error check doesn't matter because a failure would be ignored
as part of the loop condition.

PR-URL: #16950
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
addaleax authored and MylesBorins committed Dec 11, 2017
1 parent 45ca714 commit 4387a73
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/backtrace_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ void DumpBacktrace(FILE* fp) {
#if HAVE_EXECINFO_H
void* frames[256];
const int size = backtrace(frames, arraysize(frames));
if (size <= 0) {
return;
}
for (int i = 1; i < size; i += 1) {
void* frame = frames[i];
fprintf(fp, "%2d: ", i);
Expand Down

0 comments on commit 4387a73

Please sign in to comment.