Skip to content

Commit

Permalink
Remove smart pointers from misc.cc.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Nov 9, 2024
1 parent facb4cc commit 3f2bc64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/misc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include "intl.h"
#include "ascii.h"
#include "ypointer.h"

using namespace ASCII;

Expand Down Expand Up @@ -736,8 +735,9 @@ 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 asize = Elvis(limit, 20);
asmart<void*> array(new void*[asize]);
const int fixed = 40;
const int asize = (0 < limit) ? max(fixed, limit) : 20;
void *array[fixed];
const int count = backtrace(array, asize);
const char tool[] = "/usr/bin/addr2line";
char* prog = progpath();
Expand Down

0 comments on commit 3f2bc64

Please sign in to comment.