diff options
author | Joel Sherrill <joel@rtems.org> | 2018-12-04 16:55:53 -0600 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2018-12-04 16:56:01 -0600 |
commit | 55719bab1391a80fbceceac474f66ac69eb87c65 (patch) | |
tree | 7d49e2a72014d013bc78d8cd0dfd4db033629c71 /testsuites/psxtests/psxhdrs/dlfcn | |
parent | psxhdrs: POSIX API Signature Compliance Tests for ulimit.h (GCI 2018) (diff) | |
download | rtems-55719bab1391a80fbceceac474f66ac69eb87c65.tar.bz2 |
psxhdrs: Fix warnings
Diffstat (limited to 'testsuites/psxtests/psxhdrs/dlfcn')
-rw-r--r-- | testsuites/psxtests/psxhdrs/dlfcn/dlsym.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/testsuites/psxtests/psxhdrs/dlfcn/dlsym.c b/testsuites/psxtests/psxhdrs/dlfcn/dlsym.c index 83b1049c12..c11a736f46 100644 --- a/testsuites/psxtests/psxhdrs/dlfcn/dlsym.c +++ b/testsuites/psxtests/psxhdrs/dlfcn/dlsym.c @@ -2,7 +2,8 @@ * @file * @brief dlsym() API Conformance Test */ - /* + +/* * COPYRIGHT (c) 2018. * Himanshu Sekhar Nayak * @@ -18,24 +19,21 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif - - #include <dlfcn.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - int test( void ); +#include <dlfcn.h> - int result = 1; +int test( void ); - int test( void ) - { - void *filename; - int *iptr; +int test( void ) +{ + void *filename; + int *iptr; - filename = dlopen( "mylib.so", RTLD_LOCAL | RTLD_LAZY ); - iptr = dlsym( filename, "my_function" ); - result = 0; + filename = dlopen( "mylib.so", RTLD_LOCAL | RTLD_LAZY ); + iptr = dlsym( filename, "my_function" ); - return result; - } + return (iptr != NULL); +} |