diff options
author | John Birrell <jb@FreeBSD.org> | 1998-02-20 08:00:01 +0000 |
---|---|---|
committer | John Birrell <jb@FreeBSD.org> | 1998-02-20 08:00:01 +0000 |
commit | 6abbaf17acf6b2932e88ceb0c73d960f0850163a (patch) | |
tree | dababb9bbaf31a8f45e6bfe38ba0663006770c18 /lib/libc/gen | |
parent | 9fcbcd02176405d72c6c3fa1ba32f93e990e1166 (diff) | |
download | src-6abbaf17acf6b2932e88ceb0c73d960f0850163a.tar.gz src-6abbaf17acf6b2932e88ceb0c73d960f0850163a.zip |
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-)
Notes
Notes:
svn path=/head/; revision=33665
Diffstat (limited to 'lib/libc/gen')
-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 2e9766176096..ab3a404095f4 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) |