diff options
author | jake <jake@FreeBSD.org> | 2000-12-04 10:23:29 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2000-12-04 10:23:29 +0000 |
commit | cca5d18fee67d6863f7e35c9b525019f4285c736 (patch) | |
tree | 114d762c98cdb198d855650e3fb0e44e15cd3998 | |
parent | 89230d7f00d05d64e2f915b98871fb40fe6ea252 (diff) | |
download | FreeBSD-src-cca5d18fee67d6863f7e35c9b525019f4285c736.zip FreeBSD-src-cca5d18fee67d6863f7e35c9b525019f4285c736.tar.gz |
Whitespace. Fix indentation, align comments.
-rw-r--r-- | sys/kern/kern_fork.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 6d9c6c1..c71e94b 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -143,7 +143,7 @@ rfork(p, uap) } -int nprocs = 1; /* process 0 */ +int nprocs = 1; /* process 0 */ static int nextpid = 0; /* @@ -159,20 +159,20 @@ static int randompid = 0; static int sysctl_kern_randompid(SYSCTL_HANDLER_ARGS) { - int error, pid; - - pid = randompid; - error = sysctl_handle_int(oidp, &pid, 0, req); - if (error || !req->newptr) - return (error); - if (pid < 0 || pid > PID_MAX - 100) /* out of range */ - pid = PID_MAX - 100; - else if (pid < 2) /* NOP */ - pid = 0; - else if (pid < 100) /* Make it reasonable */ - pid = 100; - randompid = pid; + int error, pid; + + pid = randompid; + error = sysctl_handle_int(oidp, &pid, 0, req); + if (error || !req->newptr) return (error); + if (pid < 0 || pid > PID_MAX - 100) /* out of range */ + pid = PID_MAX - 100; + else if (pid < 2) /* NOP */ + pid = 0; + else if (pid < 100) /* Make it reasonable */ + pid = 100; + randompid = pid; + return (error); } SYSCTL_PROC(_kern, OID_AUTO, randompid, CTLTYPE_INT|CTLFLAG_RW, @@ -180,9 +180,9 @@ SYSCTL_PROC(_kern, OID_AUTO, randompid, CTLTYPE_INT|CTLFLAG_RW, int fork1(p1, flags, procp) - struct proc *p1; /* parent proc */ + struct proc *p1; /* parent proc */ int flags; - struct proc **procp; /* child proc */ + struct proc **procp; /* child proc */ { struct proc *p2, *pptr; uid_t uid; @@ -292,7 +292,7 @@ fork1(p1, flags, procp) trypid = 10; } } else { - if (randompid) + if (randompid) trypid += arc4random() % randompid; } retry: |