From a3118e8c6826349b3fc54da3850d6dea994a3a35 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 16 Jan 1997 21:58:40 +0000 Subject: 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 --- usr.sbin/rpc.statd/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/rpc.statd/file.c') diff --git a/usr.sbin/rpc.statd/file.c b/usr.sbin/rpc.statd/file.c index aeb1fc0..5dbc1cac 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"); -- cgit v1.1