From 6abbaf17acf6b2932e88ceb0c73d960f0850163a Mon Sep 17 00:00:00 2001 From: John Birrell Date: Fri, 20 Feb 1998 08:00:01 +0000 Subject: [PATCH] Fix a bogus cast for a bogus pointer check. This only checks if the pointer is 4-byte aligned. On a 64-bit machine it probably should check that the pointer is 8-byte aligned (eh, Bruce?) 8-) --- lib/libc/gen/readdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/readdir.c b/lib/libc/gen/readdir.c index 2e976617609..ab3a404095f 100644 --- a/lib/libc/gen/readdir.c +++ b/lib/libc/gen/readdir.c @@ -60,7 +60,7 @@ readdir(dirp) return (NULL); } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); - if ((int)dp & 03) /* bogus pointer check */ + if ((long)dp & 03L) /* bogus pointer check */ return (NULL); if (dp->d_reclen <= 0 || dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)