summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 0cf80b0d6..01db3a036 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -365,11 +365,10 @@ const char *ast_file_version_find(const char *file)
struct file_version *iterator;
AST_RWLIST_WRLOCK(&file_versions);
- AST_RWLIST_TRAVERSE_SAFE_BEGIN(&file_versions, iterator, list) {
+ AST_RWLIST_TRAVERSE(&file_versions, iterator, list) {
if (!strcasecmp(iterator->file, file))
break;
- }
- AST_RWLIST_TRAVERSE_SAFE_END;
+ }
AST_RWLIST_UNLOCK(&file_versions);
if (iterator)
return iterator->version;
@@ -580,9 +579,9 @@ static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cl
{
uint64_t physmem, freeram;
uint64_t freeswap = 0;
- int totalswap = 0;
int nprocs = 0;
long uptime = 0;
+ int totalswap = 0;
#if defined(HAVE_SYSINFO)
struct sysinfo sys_info;
sysinfo(&sys_info);
@@ -665,7 +664,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_SYSCTL) && defined(HAVE_SWAPCTL)
+#if defined (HAVE_SYSCTL) || defined(HAVE_SWAPCTL)
ast_cli(a->fd, " Total Swap Space: %u KiB\n", totalswap);
ast_cli(a->fd, " Free Swap Space: %" PRIu64 " KiB\n\n", freeswap);
#endif