diff options
author | Joshua Colp <jcolp@digium.com> | 2017-12-21 05:46:32 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-12-21 05:46:32 -0600 |
commit | 8030309a2f500b7274aad24f60338559a88adb61 (patch) | |
tree | 74260a0874a0ceb5f45a953c69f14eca1f42c63f | |
parent | 4f45748f52bee763977cd7ff13d24d3d6e3c8de4 (diff) | |
parent | d05ec48145ef03e92b8787843aeab22b178cc132 (diff) |
Merge "core: Fix unused variable error in handle_show_sysinfo." into 13
-rw-r--r-- | main/asterisk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index f8e31d5a0..01107e217 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -795,7 +795,9 @@ static int swapmode(int *used, int *total) static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { uint64_t physmem, freeram; +#if defined(HAVE_SYSINFO) || defined(HAVE_SWAPCTL) uint64_t freeswap = 0; +#endif int nprocs = 0; long uptime = 0; int totalswap = 0; @@ -885,7 +887,7 @@ static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cl #if defined(HAVE_SYSINFO) ast_cli(a->fd, " Buffer RAM: %" PRIu64 " KiB\n", ((uint64_t) sys_info.bufferram * sys_info.mem_unit) / 1024); #endif -#if defined(HAVE_SWAPCTL) || defined(HAVE_SYSINFO) +#if defined(HAVE_SYSINFO) || defined(HAVE_SWAPCTL) ast_cli(a->fd, " Total Swap Space: %d KiB\n", totalswap); ast_cli(a->fd, " Free Swap Space: %" PRIu64 " KiB\n\n", freeswap); #endif |