diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-01-04 16:22:56 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-01-04 16:22:56 +0200 |
commit | 8dfd8f2a829f3b4e47f8850060ce431bd3e84c1d (patch) | |
tree | b6f13f2c7953f1916c39fcfd52646ef17c741459 /rpmio | |
parent | 4cb02aa928d3e41f636d0e01356c7a3cb51018ee (diff) | |
download | librpm-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.c | 2 |
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; |