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>2016-06-29 11:12:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-29 11:14:45 +0300
commit9e173afca30b0c7b2762d13eeeea595400877506 (patch)
treebd79eb1f8fc43ccfef365122ffc806e20970a648 /source/blender/blenloader/intern/readfile.c
parent2f532c78445a9de1e64014468049649ac1de39f1 (diff)
Cleanup: endian tests
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 323f0a93e05..325f846669b 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -880,8 +880,6 @@ static void decode_blender_header(FileData *fd)
if (readsize == sizeof(header)) {
if (STREQLEN(header, "BLENDER", 7)) {
- int remove_this_endian_test = 1;
-
fd->flags |= FD_FLAGS_FILE_OK;
/* what size are pointers in the file ? */
@@ -900,7 +898,7 @@ static void decode_blender_header(FileData *fd)
/* is the file saved in a different endian
* than we need ?
*/
- if (((((char *)&remove_this_endian_test)[0] == 1) ? L_ENDIAN : B_ENDIAN) != ((header[8] == 'v') ? L_ENDIAN : B_ENDIAN)) {
+ if (((header[8] == 'v') ? L_ENDIAN : B_ENDIAN) != ENDIAN_ORDER) {
fd->flags |= FD_FLAGS_SWITCH_ENDIAN;
}