* vfs-impl.h (union vfs_dirent): Using the offsetof macro

instead of null pointer arithmethics.
This commit is contained in:
Roland Illig 2005-08-15 21:13:53 +00:00
parent f79711252d
commit 7c1b001728
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-08-15 Roland Illig <roland.illig@gmx.de>
* vfs-impl.h (union vfs_dirent): Using the offsetof macro
instead of null pointer arithmethics.
2005-07-31 Roland Illig <roland.illig@gmx.de>
* samba: Added some const qualifiers to reduce the number of gcc

View File

@ -3,6 +3,8 @@
#ifdef USE_VFS
#include <stddef.h>
typedef void *vfsid;
struct vfs_stamping;
@ -79,8 +81,7 @@ struct vfs_class {
*/
union vfs_dirent {
struct dirent dent;
char _extra_buffer[((int) &((struct dirent *) 0)->d_name) +
MC_MAXPATHLEN + 1];
char _extra_buffer[offsetof(struct dirent, d_name) + MC_MAXPATHLEN + 1];
};
/* Register a file system class */