[MIPS] ELF handling - use SELFMAG instead of numeric constant
authorCyrill Gorcunov <gorcunov@gmail.com>
Sun, 4 May 2008 16:50:02 +0000 (17:50 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 12 May 2008 15:46:55 +0000 (16:46 +0100)
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/vpe.c

index fa67e4006960dc7d26e3f8d9fb9bc02ff288e665..2794501ff302923b38afe00c3e90531379307bf2 100644 (file)
@@ -845,7 +845,7 @@ static int vpe_elfload(struct vpe * v)
 
        /* Sanity checks against insmoding binaries or wrong arch,
           weird elf version */
-       if (memcmp(hdr->e_ident, ELFMAG, 4) != 0
+       if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0
            || (hdr->e_type != ET_REL && hdr->e_type != ET_EXEC)
            || !elf_check_arch(hdr)
            || hdr->e_shentsize != sizeof(*sechdrs)) {
@@ -1114,7 +1114,7 @@ static int vpe_release(struct inode *inode, struct file *filp)
                return -ENODEV;
 
        hdr = (Elf_Ehdr *) v->pbuffer;
-       if (memcmp(hdr->e_ident, ELFMAG, 4) == 0) {
+       if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) == 0) {
                if (vpe_elfload(v) >= 0) {
                        vpe_run(v);
                } else {