[hackers] [sbase] No need to cast return value of mmap() in tr || sin

From: <git_AT_suckless.org>
Date: Sat, 12 Apr 2014 21:34:06 +0200

commit bc13aa59607802efdd96efa6cd4a3c0803287122
Author: sin <sin_AT_2f30.org>
Date: Sat Apr 12 20:32:39 2014 +0100

    No need to cast return value of mmap() in tr

diff --git a/tr.c b/tr.c
index 32e805a..9f92332 100644
--- a/tr.c
+++ b/tr.c
_AT_@ -121,8 +121,8 @@ main(int argc, char *argv[])
 
         setlocale(LC_ALL, "");
 
- mappings = (wchar_t *)mmap(NULL, 0x110000 * sizeof(wchar_t),
- PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
+ mappings = mmap(NULL, 0x110000 * sizeof(wchar_t),
+ PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
         if (mappings == MAP_FAILED)
                 eprintf("mmap:");
 
Received on Sat Apr 12 2014 - 21:34:06 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 12 2014 - 21:36:31 CEST