summaryrefslogtreecommitdiff
path: root/saveload.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-27 21:25:53 +0000
committertron <tron@openttd.org>2006-06-27 21:25:53 +0000
commit2b27073156f40df263cf653263488b8d72a76236 (patch)
tree1bfdb9c99b43fdc3b07ac13cbed4259a06d34f6f /saveload.c
parentc126ce110ee33bffe07dac5283d8a1648dc662b7 (diff)
downloadopenttd-2b27073156f40df263cf653263488b8d72a76236.tar.xz
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
Diffstat (limited to 'saveload.c')
-rw-r--r--saveload.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/saveload.c b/saveload.c
index 0b12dde64..59de6f24a 100644
--- a/saveload.c
+++ b/saveload.c
@@ -566,7 +566,7 @@ void SlArray(void *array, uint length, VarType conv)
* as a byte-type. So detect this, and adjust array size accordingly */
if (!_sl.save && _sl_version == 0) {
if (conv == SLE_INT16 || conv == SLE_UINT16 || conv == SLE_STRINGID ||
- conv == SLE_INT32 || conv == SLE_UINT32) {
+ conv == SLE_INT32 || conv == SLE_UINT32) {
length *= SlCalcConvFileLen(conv);
conv = SLE_INT8;
}
@@ -1408,8 +1408,11 @@ static void* SaveFileToDisk(void *arg)
_sl.excpt_uninit();
fprintf(stderr, "Save game failed: %s.", _sl.excpt_msg);
- if (arg != NULL) OTTD_SendThreadMessage(MSG_OTTD_SAVETHREAD_ERROR);
- else SaveFileError();
+ if (arg != NULL) {
+ OTTD_SendThreadMessage(MSG_OTTD_SAVETHREAD_ERROR);
+ } else {
+ SaveFileError();
+ }
return NULL;
}
@@ -1633,8 +1636,7 @@ int GetSavegameType(char *file)
if (fread(&hdr, sizeof(hdr), 1, f) != 1) {
printf("Savegame is obsolete or invalid format.\n");
mode = SL_LOAD; // don't try to get filename, just show name as it is written
- }
- else {
+ } else {
// see if we have any loader for this type.
for (fmt = _saveload_formats; fmt != endof(_saveload_formats); fmt++) {
if (fmt->tag == hdr) {