Date: Thu, 21 Jan 1999 03:00:03 -0800 (PST) From: Edwin Woudt <edwin@woudt.nl> To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/9590: Clean up for -Wall warnings Message-ID: <199901211100.DAA27549@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR kern/9590; it has been noted by GNATS.
From: Edwin Woudt <edwin@woudt.nl>
To: freebsd-gnats-submit@freebsd.org, gelderen@mediaport.org
Cc:
Subject: Re: kern/9590: Clean up for -Wall warnings
Date: Thu, 21 Jan 1999 11:55:32 +0100
Context diffs as suggested by Bill Fenner:
Index: imgact_elf.c
===================================================================
RCS file: /cvs/src/sys/kern/imgact_elf.c,v
retrieving revision 1.44
diff -u -r1.44 imgact_elf.c
--- imgact_elf.c 1998/12/19 02:55:33 1.44
+++ imgact_elf.c 1999/01/21 10:54:41
@@ -307,8 +307,9 @@
}
NDINIT(&nd, LOOKUP, LOCKLEAF|FOLLOW, UIO_SYSSPACE, file, p);
-
- if (error = namei(&nd)) {
+
+ error = namei(&nd);
+ if (error) {
nd.ni_vp = NULL;
goto fail;
}
@@ -330,7 +331,8 @@
goto fail;
hdr = (Elf_Ehdr *)imgp->image_header;
- if (error = elf_check_header(hdr, ET_DYN))
+ error = elf_check_header(hdr, ET_DYN);
+ if (error)
goto fail;
/* Only support headers that fit within first page for now */
@@ -352,12 +354,13 @@
if (phdr[i].p_flags & PF_R)
prot |= VM_PROT_READ;
- if (error = elf_load_section(p, vmspace, nd.ni_vp,
+ error = elf_load_section(p, vmspace, nd.ni_vp,
phdr[i].p_offset,
(caddr_t)phdr[i].p_vaddr +
(*addr),
phdr[i].p_memsz,
- phdr[i].p_filesz, prot))
+ phdr[i].p_filesz, prot);
+ if (error)
goto fail;
/*
@@ -431,7 +434,8 @@
/*
* From this point on, we may have resources that need to be freed.
*/
- if (error = exec_extract_strings(imgp))
+ error = exec_extract_strings(imgp);
+ if (error)
goto fail;
exec_new_vmspace(imgp);
@@ -450,12 +454,13 @@
if (phdr[i].p_flags & PF_R)
prot |= VM_PROT_READ;
- if (error = elf_load_section(imgp->proc,
- vmspace, imgp->vp,
- phdr[i].p_offset,
- (caddr_t)phdr[i].p_vaddr,
- phdr[i].p_memsz,
- phdr[i].p_filesz, prot))
+ error = elf_load_section(imgp->proc,
+ vmspace, imgp->vp,
+ phdr[i].p_offset,
+ (caddr_t)phdr[i].p_vaddr,
+ phdr[i].p_memsz,
+ phdr[i].p_filesz, prot);
+ if (error)
goto fail;
/*
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901211100.DAA27549>
