diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 05:20:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 12:48:17 +0300 |
commit | 7d6a9b551759cf3f1cca0c6d8ecb1459d02dcc28 (patch) | |
tree | 38a07e8238a559d0e72f10b91ee149dc62a131b3 /source/blender/blenlib | |
parent | b102472551c351d8be8ebf96e3e44a5454f02d0a (diff) |
Cleanup: style, use braces
Add braces for modules already using braces almost everywhere.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/fileops.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index f8a34404cc7..8fff9603a88 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -70,11 +70,13 @@ int BLI_file_gzip(const char *from, const char *to) /* level 1 is very close to 3 (the default) in terms of file size, * but about twice as fast, best use for speedy saving - campbell */ gzfile = BLI_gzopen(to, "wb1"); - if (gzfile == NULL) + if (gzfile == NULL) { return -1; + } file = BLI_open(from, O_BINARY | O_RDONLY, 0); - if (file == -1) + if (file == -1) { return -2; + } while (1) { readsize = read(file, buffer, sizeof(buffer)); @@ -84,8 +86,9 @@ int BLI_file_gzip(const char *from, const char *to) fprintf(stderr, "Error reading file %s: %s.\n", from, strerror(errno)); break; } - else if (readsize == 0) + else if (readsize == 0) { break; /* done reading */ + } if (gzwrite(gzfile, buffer, readsize) <= 0) { rval = -1; /* error happened in writing */ @@ -946,8 +949,9 @@ static int move_callback_pre(const char *from, const char *to) { int ret = rename(from, to); - if (ret) + if (ret) { return copy_callback_pre(from, to); + } return RecursiveOp_Callback_StopRecurs; } @@ -956,8 +960,9 @@ static int move_single_file(const char *from, const char *to) { int ret = rename(from, to); - if (ret) + if (ret) { return copy_single_file(from, to); + } return RecursiveOp_Callback_OK; } |