From a5fa9c2542a90c640abcc8bdbdddcf3811b5f151 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 10 May 2011 20:36:15 -0700 Subject: [PATCH] Read-only iteration should use const * util.cxx (spawned_pids_t::killall): Use const_iterator. --- util.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.cxx b/util.cxx index 96bc9f0de..76b0f2680 100644 --- a/util.cxx +++ b/util.cxx @@ -434,7 +434,8 @@ class spawned_pids_t { { int ret = 0; stap_sigmasker masked; - for (set::iterator it = pids.begin(); it != pids.end(); ++it) + for (set::const_iterator it = pids.begin(); + it != pids.end(); ++it) ret = kill(*it, sig) ?: ret; return ret; } -- 2.43.5