From: Josh Stone Date: Wed, 11 May 2011 03:36:15 +0000 (-0700) Subject: Read-only iteration should use const X-Git-Tag: release-1.5~54^2~5^2 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=a5fa9c2542a90c640abcc8bdbdddcf3811b5f151;p=systemtap.git Read-only iteration should use const * util.cxx (spawned_pids_t::killall): Use const_iterator. --- 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; }