From 6ce098172f3754a2c279e1e2d156f3354c612011 Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Thu, 6 Mar 2003 16:27:06 +0000 Subject: next pedantic cleanup code svn-id: r6714 --- common/file.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'common/file.cpp') diff --git a/common/file.cpp b/common/file.cpp index 64b67c5632..b678acd356 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -56,7 +56,7 @@ FILE *File::fopenNoCase(const char *filename, const char *directory, const char strcpy(buf, directory); if (directory[0] != 0) { #ifdef __MORPHOS__ - if (buf[strlen(buf)-1] != ':' && buf[strlen(buf)-1] != '/') + if (buf[strlen(buf) - 1] != ':' && buf[strlen(buf) - 1] != '/') #endif strcat(buf, "/"); } @@ -97,7 +97,6 @@ File::~File() { } bool File::open(const char *filename, const char *directory, int mode, byte encbyte) { - if (_handle) { debug(2, "File %s already opened", filename); return false; @@ -127,7 +126,7 @@ bool File::open(const char *filename, const char *directory, int mode, byte encb } _encbyte = encbyte; - + int len = strlen(filename); _name = new char[len+1]; memcpy(_name, filename, len+1); @@ -181,7 +180,7 @@ uint32 File::size() { fseek(_handle, 0, SEEK_END); uint32 length = ftell(_handle); fseek(_handle, oldPos, SEEK_SET); - + return length; } -- cgit v1.2.3