summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-09-25 19:34:02 +0000
committerphk <phk@FreeBSD.org>1994-09-25 19:34:02 +0000
commitf73f35898343587c73fd60422f7c2b15d42bae85 (patch)
tree2bdcafaa0162204e5a4853957c908b232cb276c8 /sys/kern/kern_exec.c
parent3346279530bc82ada4f70172db34ce0ddbb269bf (diff)
downloadFreeBSD-src-f73f35898343587c73fd60422f7c2b15d42bae85.zip
FreeBSD-src-f73f35898343587c73fd60422f7c2b15d42bae85.tar.gz
While in the real world, I had a bad case of being swapped out for a lot of
cycles. While waiting there I added a lot of the extra ()'s I have, (I have never used LISP to any extent). So I compiled the kernel with -Wall and shut up a lot of "suggest you add ()'s", removed a bunch of unused var's and added a couple of declarations here and there. Having a lap-top is highly recommended. My kernel still runs, yell at me if you kernel breaks.
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 2e8d719..6d1aa2e 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.7 1994/09/14 05:52:13 davidg Exp $
+ * $Id: kern_exec.c,v 1.8 1994/09/24 16:58:43 davidg Exp $
*/
#include <sys/param.h>
@@ -73,9 +73,8 @@ execve(p, uap, retval)
int *retval;
{
struct nameidata nd, *ndp;
- char *stringbase, *stringp;
int *stack_base;
- int error, resid, len, i;
+ int error, len, i;
struct image_params image_params, *iparams;
struct vnode *vnodep;
struct vattr attr;
@@ -385,11 +384,11 @@ exec_extract_strings(iparams)
argv = iparams->uap->argv;
if (argv) {
- while (argp = (caddr_t) fuword(argv++)) {
+ while ((argp = (caddr_t) fuword(argv++))) {
if (argp == (caddr_t) -1)
return (EFAULT);
- if (error = copyinstr(argp, iparams->stringp,
- iparams->stringspace, &length)) {
+ if ((error = copyinstr(argp, iparams->stringp,
+ iparams->stringspace, &length))) {
if (error == ENAMETOOLONG)
return(E2BIG);
return (error);
@@ -407,11 +406,11 @@ exec_extract_strings(iparams)
envv = iparams->uap->envv;
if (envv) {
- while (envp = (caddr_t) fuword(envv++)) {
+ while ((envp = (caddr_t) fuword(envv++))) {
if (envp == (caddr_t) -1)
return (EFAULT);
- if (error = copyinstr(envp, iparams->stringp,
- iparams->stringspace, &length)) {
+ if ((error = copyinstr(envp, iparams->stringp,
+ iparams->stringspace, &length))) {
if (error == ENAMETOOLONG)
return(E2BIG);
return (error);
@@ -438,7 +437,6 @@ exec_copyout_strings(iparams)
char **vectp;
char *stringp, *destp;
int *stack_base;
- int vect_table_size, string_table_size;
struct ps_strings *arginfo;
/*
@@ -473,7 +471,7 @@ exec_copyout_strings(iparams)
*/
for (; argc > 0; --argc) {
*(vectp++) = destp;
- while (*destp++ = *stringp++);
+ while ((*destp++ = *stringp++));
}
/* a null vector table pointer seperates the argp's from the envp's */
@@ -487,7 +485,7 @@ exec_copyout_strings(iparams)
*/
for (; envc > 0; --envc) {
*(vectp++) = destp;
- while (*destp++ = *stringp++);
+ while ((*destp++ = *stringp++));
}
/* end of vector table is a null pointer */
OpenPOWER on IntegriCloud