diff options
author | tron <tron@openttd.org> | 2006-06-27 21:25:53 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-27 21:25:53 +0000 |
commit | 2b27073156f40df263cf653263488b8d72a76236 (patch) | |
tree | 1bfdb9c99b43fdc3b07ac13cbed4259a06d34f6f /os2.c | |
parent | c126ce110ee33bffe07dac5283d8a1648dc662b7 (diff) | |
download | openttd-2b27073156f40df263cf653263488b8d72a76236.tar.xz |
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
Diffstat (limited to 'os2.c')
-rw-r--r-- | os2.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -64,10 +64,11 @@ int compare_FiosItems(const void *a, const void *b) static void append_path(char *out, const char *path, const char *file) { - if (path[2] == '\\' && path[3] == '\0') + if (path[2] == '\\' && path[3] == '\0') { sprintf(out, "%s%s", path, file); - else + } else { sprintf(out, "%s\\%s", path, file); + } } // Get a list of savegames @@ -347,10 +348,11 @@ char *FiosBrowseTo(const FiosItem *item) case FIOS_TYPE_PARENT: s = strrchr(path, '\\'); - if (s != path + 2) + if (s != path + 2) { s[0] = '\0'; - else + } else { s[1] = '\0'; + } break; case FIOS_TYPE_DIR: @@ -406,10 +408,7 @@ void FiosMakeSavegameName(char *buf, const char *name, size_t size) const char* extension; const char* period; - if (_game_mode == GM_EDITOR) - extension = ".scn"; - else - extension = ".sav"; + extension = (_game_mode == GM_EDITOR ? ".scn" : ".sav"); // Don't append the extension, if it is already there period = strrchr(name, '.'); |