From f5240c937c292770c878f10b6193b285f52818c4 Mon Sep 17 00:00:00 2001 From: albert <> Date: Thu, 5 Dec 2002 00:38:57 +0000 Subject: [PATCH] yet more --- top.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/top.c b/top.c index 45c55279..d6d5943e 100644 --- a/top.c +++ b/top.c @@ -1498,6 +1498,10 @@ static const char *rc_write_whatever (void) { /*###### Startup routines ##############################################*/ +#ifdef PRETEND4CPUS +#define smp_num_cpus 4 +#endif + /* * No mater what *they* say, we handle the really really BIG and * IMPORTANT stuff upon which all those lessor functions depend! */ @@ -1510,11 +1514,7 @@ static void before (char *me) if (Myname) ++Myname; else Myname = me; /* establish cpu particulars -- even bigger! */ -#ifdef PRETEND4CPUS - Cpu_tot = 4; -#else Cpu_tot = smp_num_cpus; -#endif Cpu_map = alloc_r(NULL, sizeof(int) * Cpu_tot); for (i = 0; i < Cpu_tot; i++) Cpu_map[i] = i; @@ -1553,7 +1553,7 @@ static void configs_read (void) const char *sec = strchr(fbuf, 's'); const char *eol = strchr(fbuf, '\n'); if (eol) { - const char *two = eol+1; // line two + const char *two = eol + 1; // line two if (sec < eol) Secure_mode = !!sec; eol = strchr(two, '\n'); if (eol && eol > two && isdigit(*two)) Rc.delay_time = atof(two); @@ -1591,8 +1591,8 @@ static void configs_read (void) for (i = 0; i < GROUPSMAX; i++) Winstk[i]->rc = rcf.win[i]; // lastly, establish the true runtime secure mode and delay time - Secure_mode = getuid() ? Secure_mode : 0; - if (!Secure_mode || !getuid()) Rc.delay_time = delay; + if (!getuid()) Secure_mode = 0; + if (!Secure_mode) Rc.delay_time = delay; } -- 2.40.0