diff options
author | jb <jb@FreeBSD.org> | 1998-02-20 08:00:01 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-02-20 08:00:01 +0000 |
commit | c72033468c963d3563cba2c67272f8c6b413c810 (patch) | |
tree | 1907939a511560c3d2f5e5f4d939974c452ae038 /lib | |
parent | f80a6bb91d65e6061adc74022d65a4ed19299205 (diff) | |
download | FreeBSD-src-c72033468c963d3563cba2c67272f8c6b413c810.zip FreeBSD-src-c72033468c963d3563cba2c67272f8c6b413c810.tar.gz |
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-)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/readdir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/readdir.c b/lib/libc/gen/readdir.c index 2e97661..ab3a404 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) |