Avoid "D linker : (null)" with debug.ld.all for dlerror.

We only want to know when dlerror is actually set. The previous change
to this logic moved it so that we only show actual updates to dlerror,
not every string that might end up in dlerror's output. This change
ignores cases where we're _clearing_ dlerror (which happens on every
call to dlerror).

Bug: http://b/37287938
Test: ran tests
Change-Id: I0c30ee199dc76d9aea165c1d90f694ead488518b
This commit is contained in:
Elliott Hughes 2017-04-15 09:11:15 -07:00
parent e8a328058d
commit 295082b3af

View file

@ -48,7 +48,7 @@ static char* __bionic_set_dlerror(char* new_value) {
char* old_value = *dlerror_slot;
*dlerror_slot = new_value;
LD_LOG(kLogErrors, "%s\n", new_value);
if (new_value != nullptr) LD_LOG(kLogErrors, "dlerror set to \"%s\"", new_value);
return old_value;
}