]> granicus.if.org Git - procps-ng/commitdiff
0057-ps/output.c: Remove the page_shift variable.
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Sat, 9 Jun 2018 11:45:38 +0000 (21:45 +1000)
It is static and not used anywhere.

---------------------------- adapted for newlib branch
. limited to whitespace/formatting differences

Signed-off-by: Jim Warner <james.warner@comcast.net>
ps/output.c

index b1df1fdbdc355002097f83607608a03e168074d5..8b118d27243aec760d616fbabafa5d3370d5d397 100644 (file)
@@ -83,7 +83,6 @@ static unsigned max_leftward = 0x12345678; /* space for LEFT stuff */
 static int wide_signals;  /* true if we have room */
 
 static time_t seconds_since_1970;
-static unsigned long page_shift;
 
 static unsigned int boot_time;
 static unsigned long memory_total;
@@ -2056,17 +2055,6 @@ void init_output(void)
     int outbuf_pages;
     char *outbuf;
 
-    switch(page_size) {
-       case 65536: page_shift = 16; break;
-       case 32768: page_shift = 15; break;
-       case 16384: page_shift = 14; break;
-       case  8192: page_shift = 13; break;
-       default: /* Assume 4096 */
-       case  4096: page_shift = 12; break;
-       case  2048: page_shift = 11; break;
-       case  1024: page_shift = 10; break;
-    }
-
     // add page_size-1 to round up
     outbuf_pages = (OUTBUF_SIZE+SPACE_AMOUNT+page_size-1)/page_size;
     outbuf = mmap(