Fix: remove NULL check of nonnull parameter in dlclose
authorAntoine Busque <abusque@efficios.com>
Mon, 9 May 2016 20:33:29 +0000 (16:33 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 9 May 2016 20:35:44 +0000 (16:35 -0400)
The `handle` parameter of `dlclose`, as defined in
`include/lttng/ust-dlfcn.h` is marked `__nonnull`. GCC starting with
version 6.1 emits warnings for comparisons of nonnull arguments
against NULL by default (see -Wnonnull-compare).

Therefore, this removes a superfluous NULL check on `handle`, for
which GCC emitted a warning.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-dl/lttng-ust-dl.c

index 954d9dfcb7381025e82054b110a525ae5855e717..ac3c951fc85cd9ee80f096fd033d9852630bc31f 100644 (file)
@@ -144,7 +144,7 @@ void *dlopen(const char *filename, int flag)
 
 int dlclose(void *handle)
 {
-       if (__tracepoint_ptrs_registered && handle) {
+       if (__tracepoint_ptrs_registered) {
                struct link_map *p = NULL;
                int ret;
 
This page took 0.024554 seconds and 4 git commands to generate.