]> sourceware.org Git - systemtap.git/commitdiff
Read-only iteration should use const
authorJosh Stone <jistone@redhat.com>
Wed, 11 May 2011 03:36:15 +0000 (20:36 -0700)
committerJosh Stone <jistone@redhat.com>
Wed, 11 May 2011 03:36:15 +0000 (20:36 -0700)
* util.cxx (spawned_pids_t::killall): Use const_iterator.

util.cxx

index 96bc9f0de16661647e51f830ec60d7079948b600..76b0f2680f0c957cdbd4152eae2e07576e87cfcd 100644 (file)
--- a/util.cxx
+++ b/util.cxx
@@ -434,7 +434,8 @@ class spawned_pids_t {
       {
         int ret = 0;
         stap_sigmasker masked;
-        for (set<pid_t>::iterator it = pids.begin(); it != pids.end(); ++it)
+        for (set<pid_t>::const_iterator it = pids.begin();
+             it != pids.end(); ++it)
           ret = kill(*it, sig) ?: ret;
         return ret;
       }
This page took 0.026674 seconds and 5 git commands to generate.