diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-12-30 12:38:29 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-12-30 12:38:29 +0000 |
commit | 43a91e9332db2021cd93ca2edfc35fd3fe673cee (patch) | |
tree | 4bfb6b2107a7907dca6bd1d2cd0c474d9d9a595f | |
parent | use MAP_FAILED rather than custom constant (diff) | |
download | pax-utils-43a91e9332db2021cd93ca2edfc35fd3fe673cee.tar.gz pax-utils-43a91e9332db2021cd93ca2edfc35fd3fe673cee.tar.bz2 pax-utils-43a91e9332db2021cd93ca2edfc35fd3fe673cee.zip |
drop MAP_FAILED casts as its a void*
-rw-r--r-- | paxelf.c | 4 | ||||
-rw-r--r-- | paxmacho.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* * Copyright 2003-2007 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.61 2008/12/30 12:34:28 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.62 2008/12/30 12:38:29 vapier Exp $ * * Copyright 2005-2007 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2007 Mike Frysinger - <vapier@gentoo.org> @@ -543,7 +543,7 @@ elfobj *_readelf_fd(const char *filename, int fd, size_t len, int read_only) } buffer = mmap(0, len, PROT_READ | (read_only ? 0 : PROT_WRITE), (read_only ? MAP_PRIVATE : MAP_SHARED), fd, 0); - if (buffer == (char*)MAP_FAILED) { + if (buffer == MAP_FAILED) { warn("mmap on '%s' of %li bytes failed :(", filename, (unsigned long)len); return NULL; } @@ -1,7 +1,7 @@ /* * Copyright 2003-2008 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.c,v 1.12 2008/12/30 12:34:28 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.c,v 1.13 2008/12/30 12:38:29 vapier Exp $ * * Copyright 2005-2007 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2007 Mike Frysinger - <vapier@gentoo.org> @@ -239,7 +239,7 @@ fatobj *readmacho_fd(const char *filename, int fd, size_t len) return NULL; data = mmap(0, len, PROT_READ, MAP_PRIVATE, fd, 0); - if (data == (char*)MAP_FAILED) { + if (data == MAP_FAILED) { warn("mmap on '%s' of %llu bytes failed :(", filename, (unsigned long long)len); return NULL; |