aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-12-30 12:38:29 +0000
committerMike Frysinger <vapier@gentoo.org>2008-12-30 12:38:29 +0000
commit43a91e9332db2021cd93ca2edfc35fd3fe673cee (patch)
tree4bfb6b2107a7907dca6bd1d2cd0c474d9d9a595f
parentuse MAP_FAILED rather than custom constant (diff)
downloadpax-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.c4
-rw-r--r--paxmacho.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/paxelf.c b/paxelf.c
index 9dc577d..6b51bbe 100644
--- a/paxelf.c
+++ b/paxelf.c
@@ -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;
}
diff --git a/paxmacho.c b/paxmacho.c
index cb27fa0..ab87011 100644
--- a/paxmacho.c
+++ b/paxmacho.c
@@ -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;