[PATCH] Remove VLA from fs/reiserfs/reiserfs.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From 4506c33375273e62c5b51e42e52d0382abd3b750 Mon Sep 17 00:00:00 2001
From: Kyle Spiers <kyle@xxxxxxxxx>
Date: Thu, 8 Mar 2018 17:28:43 -0800
Subject: [PATCH] Remove VLA from fs/reiserfs/reiserfs.h

Remove VLA from fs/reiserfs/reiserfs.h

Signed-off-by: Kyle Spiers <kyle@xxxxxxxxx>
---
 fs/reiserfs/reiserfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h
index 48835a6..ae4811f 100644
--- a/fs/reiserfs/reiserfs.h
+++ b/fs/reiserfs/reiserfs.h
@@ -1916,7 +1916,7 @@ struct reiserfs_de_head {
 
 /* empty directory contains two entries "." and ".." and their headers */
 #define EMPTY_DIR_SIZE \
-(DEH_SIZE * 2 + ROUND_UP (strlen (".")) + ROUND_UP (strlen ("..")))
+(DEH_SIZE * 2 + ROUND_UP (sizeof(".") - 1) + ROUND_UP (sizeof("..") - 1))
 
 /* old format directories have this size when empty */
 #define EMPTY_DIR_SIZE_V1 (DEH_SIZE * 2 + 3)
-- 
2.7.4


[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux