Commit 7cd98261 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Lasse Karstensen

At least one platform has a backtrace(3) which returns -1 in a size_t :-(

parent 729c2c59
......@@ -418,14 +418,16 @@ static void
pan_backtrace(struct vsb *vsb)
{
void *array[10];
size_t size;
size_t i;
ssize_t size;
ssize_t i;
char **strings;
char *p;
size = backtrace (array, 10);
if (size == 0)
if (size <= 0) {
VSB_printf(vsb, "Backtrace not available (%zd)\n", size);
return;
}
VSB_printf(vsb, "Backtrace:\n");
VSB_indent(vsb, 2);
for (i = 0; i < size; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment