Date: Tue, 15 Nov 2011 06:50:10 +0000 (UTC) From: "David E. O'Brien" <obrien@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227526 - head/usr.sbin/pmcstat Message-ID: <201111150650.pAF6oAOZ085356@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: obrien Date: Tue Nov 15 06:50:10 2011 New Revision: 227526 URL: http://svn.freebsd.org/changeset/base/227526 Log: KNF Modified: head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Tue Nov 15 06:45:51 2011 (r227525) +++ head/usr.sbin/pmcstat/pmcstat_log.c Tue Nov 15 06:50:10 2011 (r227526) @@ -1218,22 +1218,23 @@ pmcstat_process_lookup(pid_t pid, int al hash = (uint32_t) pid & PMCSTAT_HASH_MASK; /* simplicity wins */ LIST_FOREACH_SAFE(pp, &pmcstat_process_hash[hash], pp_next, pptmp) - if (pp->pp_pid == pid) { - /* Found a descriptor, check and process zombies */ - if (allocate && pp->pp_isactive == 0) { - /* remove maps */ - TAILQ_FOREACH_SAFE(ppm, &pp->pp_map, ppm_next, - ppmtmp) { - TAILQ_REMOVE(&pp->pp_map, ppm, ppm_next); - free(ppm); - } - /* remove process entry */ - LIST_REMOVE(pp, pp_next); - free(pp); - break; - } - return (pp); - } + if (pp->pp_pid == pid) { + /* Found a descriptor, check and process zombies */ + if (allocate && pp->pp_isactive == 0) { + /* remove maps */ + TAILQ_FOREACH_SAFE(ppm, &pp->pp_map, ppm_next, + ppmtmp) { + TAILQ_REMOVE(&pp->pp_map, ppm, + ppm_next); + free(ppm); + } + /* remove process entry */ + LIST_REMOVE(pp, pp_next); + free(pp); + break; + } + return (pp); + } if (!allocate) return (NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111150650.pAF6oAOZ085356>