Skip to contentSkip to conversation

Fix: remove NULL check of nonnull parameter in dlclose

PATCH Mathieu Desnoyers 1 participant 1 message May 9, 2016 1 message not in the archive

lore
Share & tools
lore

Mathieu Desnoyers

author Applied
#1 lore raw
In reply to a message not in the archive

Merged into master and stable-2.8. I tweaked your email changelog to remove the whitespace at the beginning of every line. You may have an issue with your email client config.

Thanks,

Mathieu

Quoted 28 lines · ----- On May 9, 2016, at 4:33 PM, Antoine Busque [email protected] wrote:

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.

---
liblttng-ust-dl/lttng-ust-dl.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
liblttng-ust-dl/lttng-ust-dl.c +1 -2
index 954d9df..ac3c951 100644
@@ -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;
 
--

2.8.2

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev