summaryrefslogtreecommitdiff
path: root/src/core/panic.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-04-24 16:39:35 -0700
committerGarrett D'Amore <garrett@damore.org>2018-04-24 16:39:35 -0700
commitd35973833e6bf05fec29100a4d5e66bb07b06659 (patch)
treeb380e99a092a0229c8f087d231306b398f6f43f2 /src/core/panic.c
parent007f74b1053c9406340ffa728f9c254ba37e2a6c (diff)
downloadnng-d35973833e6bf05fec29100a4d5e66bb07b06659.tar.gz
nng-d35973833e6bf05fec29100a4d5e66bb07b06659.tar.bz2
nng-d35973833e6bf05fec29100a4d5e66bb07b06659.zip
fix a number of cppcheck complaints (not all)
Diffstat (limited to 'src/core/panic.c')
-rw-r--r--src/core/panic.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/panic.c b/src/core/panic.c
index f3c7cb26..ff621a59 100644
--- a/src/core/panic.c
+++ b/src/core/panic.c
@@ -1,5 +1,6 @@
//
-// Copyright 2016 Garrett D'Amore <garrett@damore.org>
+// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -23,18 +24,16 @@ void
nni_show_backtrace(void)
{
#if NNG_HAVE_BACKTRACE
- void * frames[50];
- int nframes;
- char **lines;
- int i;
+ void *frames[50];
+ int nframes;
nframes = backtrace(frames, sizeof(frames) / sizeof(frames[0]));
if (nframes > 1) {
- lines = backtrace_symbols(frames, nframes);
+ char **lines = backtrace_symbols(frames, nframes);
if (lines == NULL) {
return;
}
- for (i = 1; i < nframes; i++) {
+ for (int i = 1; i < nframes; i++) {
nni_println(lines[i]);
}
}