aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rpc.statd
diff options
context:
space:
mode:
authorAlexander Langer <alex@FreeBSD.org>1997-01-16 21:58:40 +0000
committerAlexander Langer <alex@FreeBSD.org>1997-01-16 21:58:40 +0000
commit8abdc2eb40c03b97153f2a01bdb53927f3a336c1 (patch)
treed61898dd79824c10ca33127214d8569c804559c2 /usr.sbin/rpc.statd
parent839cc09e5384e6f8c0ebb9203052015b532cfce7 (diff)
Sweep through the tree fixing mmap() usage:
- Use MAP_FAILED instead of the constant -1 to indicate failure (required by POSIX). - Removed flag arguments of '0' (required by POSIX). - Fixed code which expected an error return of 0. - Fixed code which thought any address with the high bit set was an error. - Check for failure where no checks were present. Discussed with: bde
Notes
svn path=/head/; revision=21786
Diffstat (limited to 'usr.sbin/rpc.statd')
-rw-r--r--usr.sbin/rpc.statd/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/rpc.statd/file.c b/usr.sbin/rpc.statd/file.c
index aeb1fc09651d..5dbc1cac6e80 100644
--- a/usr.sbin/rpc.statd/file.c
+++ b/usr.sbin/rpc.statd/file.c
@@ -158,7 +158,7 @@ void init_file(char *filename)
status_info = (FileLayout *)
mmap(NULL, 0x10000000, PROT_READ | PROT_WRITE, MAP_SHARED, status_fd, 0);
- if (status_info == (FileLayout *) -1)
+ if (status_info == (FileLayout *) MAP_FAILED)
{
perror("rpc.statd");
fprintf(stderr, "Unable to mmap() status file\n");