about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/loadlocale.c2
-rw-r--r--locale/programs/localedef.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 544c09ad88..edbe891f84 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -127,7 +127,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
 #endif
   filedata = (void *) __mmap ((caddr_t) 0, st.st_size, PROT_READ,
 			      MAP_FILE|MAP_COPY|MAP_INHERIT, fd, 0);
-  if (filedata == (void *) -1)
+  if (filedata == MAP_FAILED)
     {
       if (errno == ENOSYS)
 	{
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 206246944f..6290274a72 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -279,7 +279,7 @@ cannot `stat' locale file `%s'"),
 	      localedef->categories[cat].generic
 		= mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
 
-	      if (localedef->categories[cat].generic == (void *) -1)
+	      if (localedef->categories[cat].generic == MAP_FAILED)
 		{
 		  size_t left = st.st_size;
 		  void *read_ptr;