From 9ba948a4859da3308033fa6dc54f74433d7e6a21 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Mar 2019 13:16:10 +1100 Subject: Cleanup: style, use braces for blenlib --- source/blender/blenlib/intern/dynlib.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/blenlib/intern/dynlib.c') 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; -- cgit v1.2.3