From 4700c9626861b193798b3cf3d53fb89a913c5819 Mon Sep 17 00:00:00 2001 From: Naram Qashat Date: Wed, 28 Jul 2010 00:19:19 -0400 Subject: Yet more annoying code cleanup, plus made Server's Links list into a normal variable and not a pointer. --- modules/core/os_stats.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/core/os_stats.cpp b/modules/core/os_stats.cpp index 08a27e31d..f554092e7 100644 --- a/modules/core/os_stats.cpp +++ b/modules/core/os_stats.cpp @@ -27,8 +27,8 @@ static int stats_count_servers(Server *s) int count = 1; - if (s->GetLinks()) - for (std::list::const_iterator it = s->GetLinks()->begin(), it_end = s->GetLinks()->end(); it != it_end; ++it) + if (!s->GetLinks().empty()) + for (std::list::const_iterator it = s->GetLinks().begin(), it_end = s->GetLinks().end(); it != it_end; ++it) count += stats_count_servers(*it); return count; -- cgit