1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Fixed some more easy cases of const poisoning in the kernel. Cosmetic.

This commit is contained in:
Bruce Evans 1996-09-03 22:19:16 +00:00
parent a390940e3f
commit f58609f0c6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18024
2 changed files with 11 additions and 11 deletions

View File

@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: imgact_coff.c,v 1.15 1996/05/01 02:42:12 bde Exp $
* $Id: imgact_coff.c,v 1.16 1996/06/12 05:03:10 gpalmer Exp $
*/
#include <sys/param.h>
@ -296,9 +296,9 @@ int
exec_coff_imgact(imgp)
struct image_params *imgp;
{
struct filehdr *fhdr = (struct filehdr*)imgp->image_header;
struct aouthdr *ahdr;
struct scnhdr *scns;
const struct filehdr *fhdr = (const struct filehdr*)imgp->image_header;
const struct aouthdr *ahdr;
const struct scnhdr *scns;
int i;
struct vmspace *vmspace = imgp->proc->p_vmspace;
int nscns;
@ -326,13 +326,13 @@ exec_coff_imgact(imgp)
return -1;
}
ahdr = (struct aouthdr*)((char*)(imgp->image_header) +
sizeof(struct filehdr));
ahdr = (const struct aouthdr*)
((const char*)(imgp->image_header) + sizeof(struct filehdr));
imgp->entry_addr = ahdr->entry;
scns = (struct scnhdr*)((char*)(imgp->image_header) +
sizeof(struct filehdr) +
sizeof(struct aouthdr));
scns = (const struct scnhdr*)
((const char*)(imgp->image_header) + sizeof(struct filehdr) +
sizeof(struct aouthdr));
if (error = exec_extract_strings(imgp)) {
DPRINTF(("%s(%d): return %d\n", __FILE__, __LINE__, error));

View File

@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: imgact_linux.c,v 1.14 1996/05/01 02:42:32 bde Exp $
* $Id: imgact_linux.c,v 1.15 1996/05/02 10:43:12 phk Exp $
*/
#include <sys/param.h>
@ -61,7 +61,7 @@ int
exec_linux_imgact(imgp)
struct image_params *imgp;
{
struct exec *a_out = (struct exec *) imgp->image_header;
const struct exec *a_out = (const struct exec *) imgp->image_header;
struct vmspace *vmspace = imgp->proc->p_vmspace;
vm_offset_t vmaddr;
unsigned long virtual_offset, file_offset;