Page MenuHomeFreeBSD

D47936.diff
No OneTemporary

D47936.diff

diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -1962,6 +1962,8 @@
{
struct denode *dep;
struct defid *defhp;
+ _Static_assert(sizeof(struct defid) <= sizeof(struct fid),
+ "struct defid cannot be larger than struct fid");
dep = VTODE(ap->a_vp);
defhp = (struct defid *)ap->a_fhp;
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -1709,6 +1709,8 @@
struct tmpfs_fid_data tfd;
struct tmpfs_node *node;
struct fid *fhp;
+ _Static_assert(sizeof(struct tmpfs_fid_data) <= sizeof(struct fid),
+ "struct tmpfs_fid_data cannot be larger than struct fid");
node = VP_TO_TMPFS_NODE(ap->a_vp);
fhp = ap->a_fhp;
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c
--- a/sys/fs/udf/udf_vnops.c
+++ b/sys/fs/udf/udf_vnops.c
@@ -1274,6 +1274,8 @@
{
struct udf_node *node;
struct ifid *ifhp;
+ _Static_assert(sizeof(struct ifid) <= sizeof(struct fid),
+ "struct ifid cannot be larger than struct fid");
node = VTON(a->a_vp);
ifhp = (struct ifid *)a->a_fhp;
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1919,6 +1919,8 @@
{
struct inode *ip;
struct ufid *ufhp;
+ _Static_assert(sizeof(struct ufid) <= sizeof(struct fid),
+ "struct ufid cannot be larger than struct fid");
ip = VTOI(ap->a_vp);
ufhp = (struct ufid *)ap->a_fhp;

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 4:52 PM (19 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16092817
Default Alt Text
D47936.diff (1 KB)

Event Timeline