diff --git a/src/d_main.c b/src/d_main.c index d20b07afd..644f74419 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1243,17 +1243,15 @@ void D_CleanFile(char **filearray) static boolean AddIWAD(void) { - char * path = va(pandf,srb2path,"srb2.srb"); + char * path = va(pandf, srb2path, "srb2.srb"); if (FIL_ReadFileOK(path)) { D_AddFile(path, startupwadfiles); return true; } - else - { - return false; - } + + return false; } // extra graphic patches for saturn specific thingies @@ -1293,20 +1291,18 @@ static void IdentifyVersion(void) // get the current directory (possible problem on NT with "." as current dir) if (srb2waddir) { - strlcpy(srb2path,srb2waddir,sizeof (srb2path)); + strlcpy(srb2path, srb2waddir, sizeof(srb2path)); } else { - if (getcwd(srb2path, 256) != NULL) + if (getcwd(srb2path, sizeof(srb2path))) srb2waddir = srb2path; else - { - srb2waddir = srb2path; - } + srb2waddir = "."; } // Load the IWAD - if (! AddIWAD()) + if (!AddIWAD()) { I_Error("SRB2.SRB not found! Expected in %s\n", srb2waddir); }