Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2012 07:18:28 +0000 (UTC)
From:      "David E. O'Brien" <obrien@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r237970 - stable/9/usr.sbin/pmcstat
Message-ID:  <201207020718.q627ISZs054193@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: obrien
Date: Mon Jul  2 07:18:27 2012
New Revision: 237970
URL: http://svn.freebsd.org/changeset/base/237970

Log:
  MFC: r227526: KNF

Modified:
  stable/9/usr.sbin/pmcstat/pmcstat_log.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/pmcstat/   (props changed)

Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- stable/9/usr.sbin/pmcstat/pmcstat_log.c	Mon Jul  2 07:14:21 2012	(r237969)
+++ stable/9/usr.sbin/pmcstat/pmcstat_log.c	Mon Jul  2 07:18:27 2012	(r237970)
@@ -1235,22 +1235,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?201207020718.q627ISZs054193>