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 rvagg committed Aug 16, 2018
1 parent 3857e10 commit 7cf26e5
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 7cf26e5

Please sign in to comment.