[procps] Re: cgroup support for new top

  • From: Jan Görig <jgorig@xxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Mon, 18 Apr 2011 13:32:50 +0200


p.s. if you use the latest newtop, consider the patch below.  I promised Craig 
no more patches, so be sure not to tell him about this...


diff --git a/top.c b/top.c
index 434cc1b..e387a7b 100644
--- a/top.c
+++ b/top.c
@@ -194,7 +194,7 @@ static int   *PHash_sav = HHash_one,   // alternating 
'old/new' hash tables
           * Create string from cgroup array --
           * ( eventually to find a home in libproc ? ) */
  static void parse_cgroup (char *dst, size_t max, const proc_t *p) {
-   int whackable_int;
+   int whackable_int = max;
     char *ccgroup, *endp = dst;


Yes, this should be initialized :-)


Other related posts: