svn commit: r237970 - stable/9/usr.sbin/pmcstat

David E. O'Brien obrien at FreeBSD.org
Mon Jul 2 07:18:28 UTC 2012


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);


More information about the svn-src-stable-9 mailing list