Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-03-24 10:18:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-24 10:18:31 +0400
commit69e6894b15271884623ea6f56ead06db83acbe99 (patch)
treeb68200606afaca06cf7552f6b12fc20ebd30d487 /source/blender/blenloader/intern/runtime.c
parent7b99ae0ad3017e373be2a344e30d190b70ca66b4 (diff)
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/blenloader/intern/runtime.c')
-rw-r--r--source/blender/blenloader/intern/runtime.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenloader/intern/runtime.c b/source/blender/blenloader/intern/runtime.c
index 88f602641ff..814061b7318 100644
--- a/source/blender/blenloader/intern/runtime.c
+++ b/source/blender/blenloader/intern/runtime.c
@@ -60,7 +60,7 @@ static int handle_read_msb_int(int handle)
{
unsigned char buf[4];
- if(read(handle, buf, 4) != 4)
+ if (read(handle, buf, 4) != 4)
return -1;
return (buf[0]<<24) + (buf[1]<<16) + (buf[2]<<8) + (buf[3]<<0);
@@ -72,24 +72,24 @@ int BLO_is_a_runtime(const char *path)
int datastart;
char buf[8];
- if(fd==-1)
+ if (fd==-1)
goto cleanup;
lseek(fd, -12, SEEK_END);
datastart= handle_read_msb_int(fd);
- if(datastart==-1)
+ if (datastart==-1)
goto cleanup;
- else if(read(fd, buf, 8)!=8)
+ else if (read(fd, buf, 8)!=8)
goto cleanup;
- else if(memcmp(buf, "BRUNTIME", 8)!=0)
+ else if (memcmp(buf, "BRUNTIME", 8)!=0)
goto cleanup;
else
res= 1;
cleanup:
- if(fd!=-1)
+ if (fd!=-1)
close(fd);
return res;
@@ -104,7 +104,7 @@ BlendFileData *BLO_read_runtime(const char *path, ReportList *reports)
fd= BLI_open(path, O_BINARY|O_RDONLY, 0);
- if(fd==-1) {
+ if (fd==-1) {
BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", path, strerror(errno));
goto cleanup;
}
@@ -115,15 +115,15 @@ BlendFileData *BLO_read_runtime(const char *path, ReportList *reports)
datastart= handle_read_msb_int(fd);
- if(datastart==-1) {
+ if (datastart==-1) {
BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (problem seeking)", path);
goto cleanup;
}
- else if(read(fd, buf, 8)!=8) {
+ else if (read(fd, buf, 8)!=8) {
BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (truncated header)", path);
goto cleanup;
}
- else if(memcmp(buf, "BRUNTIME", 8)!=0) {
+ else if (memcmp(buf, "BRUNTIME", 8)!=0) {
BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (not a blend file)", path);
goto cleanup;
}
@@ -135,7 +135,7 @@ BlendFileData *BLO_read_runtime(const char *path, ReportList *reports)
}
cleanup:
- if(fd!=-1)
+ if (fd!=-1)
close(fd);
return bfd;