Skip to content

Commit

Permalink
Replace max by min.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Nov 9, 2024
1 parent 1b348a4 commit 0da07f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ int process_close(FILE* fp, int pid) {
void show_backtrace(const int limit) {
#if defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_EXECINFO_H)
const int fixed = 40;
const int asize = (0 < limit) ? max(fixed, limit) : 20;
const int asize = (0 < limit) ? min(fixed, limit) : 20;
void *array[fixed];
const int count = backtrace(array, asize);
const char tool[] = "/usr/bin/addr2line";
Expand Down

0 comments on commit 0da07f1

Please sign in to comment.