summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-01-04 16:22:56 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-01-04 16:22:56 +0200
commit8dfd8f2a829f3b4e47f8850060ce431bd3e84c1d (patch)
treeb6f13f2c7953f1916c39fcfd52646ef17c741459 /rpmio
parent4cb02aa928d3e41f636d0e01356c7a3cb51018ee (diff)
downloadlibrpm-tizen-8dfd8f2a829f3b4e47f8850060ce431bd3e84c1d.tar.gz
librpm-tizen-8dfd8f2a829f3b4e47f8850060ce431bd3e84c1d.tar.bz2
librpm-tizen-8dfd8f2a829f3b4e47f8850060ce431bd3e84c1d.zip
Use MAP_FAILED instead of hardwired (void *)-1
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/rpmfileutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c
index 19dc5eb30..454d8e3ac 100644
--- a/rpmio/rpmfileutil.c
+++ b/rpmio/rpmfileutil.c
@@ -161,7 +161,7 @@ int rpmDoDigest(pgpHashAlgo algo, const char * fn,int asAscii,
if (fsize) {
mapped = mmap(NULL, fsize, PROT_READ, MAP_SHARED, fdno, 0);
- if (mapped == (void *)-1) {
+ if (mapped == MAP_FAILED) {
xx = close(fdno);
rc = 1;
break;