diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 05:16:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 05:17:30 +0300 |
commit | 9ba948a4859da3308033fa6dc54f74433d7e6a21 (patch) | |
tree | 0bd6e95eb59d9af03aa32d925c68e1cbebecc246 /source/blender/blenlib/intern/dynlib.c | |
parent | 337eb8c1de4c57c34520b467d79779153335eecb (diff) |
Cleanup: style, use braces for blenlib
Diffstat (limited to 'source/blender/blenlib/intern/dynlib.c')
-rw-r--r-- | source/blender/blenlib/intern/dynlib.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c index b172ae7a518..31f8d9d3d57 100644 --- a/source/blender/blenlib/intern/dynlib.c +++ b/source/blender/blenlib/intern/dynlib.c @@ -51,8 +51,9 @@ DynamicLibrary *BLI_dynlib_open(const char *name) handle = LoadLibraryW(name_16); UTF16_UN_ENCODE(name); - if (!handle) + if (!handle) { return NULL; + } lib = MEM_callocN(sizeof(*lib), "Dynamic Library"); lib->handle = handle; @@ -71,8 +72,9 @@ char *BLI_dynlib_get_error_as_string(DynamicLibrary *lib) /* if lib is NULL reset the last error code */ err = GetLastError(); - if (!lib) + if (!lib) { SetLastError(ERROR_SUCCESS); + } if (err) { static char buf[1024]; @@ -103,8 +105,9 @@ DynamicLibrary *BLI_dynlib_open(const char *name) DynamicLibrary *lib; void *handle = dlopen(name, RTLD_LAZY); - if (!handle) + if (!handle) { return NULL; + } lib = MEM_callocN(sizeof(*lib), "Dynamic Library"); lib->handle = handle; |