[git commit master] vi: remove superfluous check on filename == ""

Denys Vlasenko vda.linux at googlemail.com
Mon Apr 19 03:39:41 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=def4783a8a8b00f58d224ff6735d3532809aeb54
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 editors/vi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/editors/vi.c b/editors/vi.c
index 2861250..f925984 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2306,7 +2306,7 @@ static int file_size(const char *fn) // what is the byte size of "fn"
 	int cnt;
 
 	cnt = -1;
-	if (fn && fn[0] && stat(fn, &st_buf) == 0)	// see if file exists
+	if (fn && stat(fn, &st_buf) == 0)	// see if file exists
 		cnt = (int) st_buf.st_size;
 	return cnt;
 }
-- 
1.6.3.3



More information about the busybox-cvs mailing list