[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 34/75: boot: Fix boot.c compiler warning.
From: |
Samuel Thibault |
Subject: |
[hurd] 34/75: boot: Fix boot.c compiler warning. |
Date: |
Thu, 14 Jan 2016 01:04:08 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit b4cf10f408d50e4caaeda6d2bc9df2db3398a9cd
Author: Flavio Cruz <address@hidden>
Date: Tue Dec 29 17:31:30 2015 +0100
boot: Fix boot.c compiler warning.
* boot/boot.c: Compare header without using pointer dereferencing.
---
boot/boot.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/boot/boot.c b/boot/boot.c
index f688860..4dda26b 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -243,7 +243,9 @@ load_image (task_t t,
}
read (fd, &hdr, sizeof hdr);
- if (*(Elf32_Word *) hdr.e.e_ident == *(Elf32_Word *) "\177ELF")
+ /* File must have magic ELF number. */
+ if (hdr.e.e_ident[0] == 0177 && hdr.e.e_ident[1] == 'E' &&
+ hdr.e.e_ident[2] == 'L' && hdr.e.e_ident[3] == 'F')
{
Elf32_Phdr phdrs[hdr.e.e_phnum], *ph;
lseek (fd, hdr.e.e_phoff, SEEK_SET);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 57/75: Add missing libraries to fix link errors, (continued)
- [hurd] 57/75: Add missing libraries to fix link errors, Samuel Thibault, 2016/01/13
- [hurd] 52/75: fix compiler warnings in hurd/random, Samuel Thibault, 2016/01/13
- [hurd] 62/75: fix mach-defpager static linking, Samuel Thibault, 2016/01/13
- [hurd] 60/75: Drop OTHERLIBS and use LDLIBS exclusively, Samuel Thibault, 2016/01/13
- [hurd] 63/75: allow pfinet to link using -O0, Samuel Thibault, 2016/01/13
- [hurd] 55/75: fix compiler warnings in hurd/utils, Samuel Thibault, 2016/01/13
- [hurd] 48/75: drop the deprecated malloc/free hooks in hurd/mach-defpager, Samuel Thibault, 2016/01/13
- [hurd] 38/75: fix compiler warnings in hurd/ext2fs, Samuel Thibault, 2016/01/13
- [hurd] 39/75: fix compiler warnings in hurd/console-client, Samuel Thibault, 2016/01/13
- [hurd] 51/75: Include missing header file in hurd/proc, Samuel Thibault, 2016/01/13
- [hurd] 34/75: boot: Fix boot.c compiler warning.,
Samuel Thibault <=
- [hurd] 53/75: fix compiler warnings in hurd/startup, Samuel Thibault, 2016/01/13
- [hurd] 36/75: fix compiler warnings in hurd/daemons, Samuel Thibault, 2016/01/13
- [hurd] 37/75: fix compiler warnings in hurd/exec, Samuel Thibault, 2016/01/13
- [hurd] 44/75: fix compiler warnings in hurd/libihash, Samuel Thibault, 2016/01/13
- [hurd] 42/75: fix compiler warnings in hurd/isofs, Samuel Thibault, 2016/01/13
- [hurd] 43/75: fix compiler warnings in hurd/libftpconn, Samuel Thibault, 2016/01/13
- [hurd] 61/75: fix compiler warning in hurd/fstests, Samuel Thibault, 2016/01/13
- [hurd] 45/75: fix compiler warnings in hurd/libnetfs, Samuel Thibault, 2016/01/13
- [hurd] 59/75: Use DEVICE_IMPORTS to include libports/ports.h, Samuel Thibault, 2016/01/13
- [hurd] 46/75: fix compiler warnings in hurd/libshouldbeinlibc, Samuel Thibault, 2016/01/13