]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
[gdb] Improve early exits for env var in debuginfod-support.c
authorTom de Vries <tdevries@suse.de>
Wed, 18 Nov 2020 21:15:50 +0000 (22:15 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 18 Nov 2020 21:15:50 +0000 (22:15 +0100)
commitc44191f8e316f2f4d72d78aaca54a1811840dc70
tree5b4deba13c27352b4f91391c91b05ba2e3632c8c
parent7cb2893dfab189edce07144259db882a34e8c93b
[gdb] Improve early exits for env var in debuginfod-support.c

There's an early exit in libdebuginfod's debuginfod_query_server, which checks
both for:
- getenv (DEBUGINFOD_URLS_ENV_VAR) == NULL, and
- (getenv (DEBUGINFOD_URLS_ENV_VAR))[0] == '\0'.

In debuginfod_source_query and debuginfod_debuginfo_query (which both
end up calling debuginfod_query_server) there are also early exits checking
the same env var, but those just check for NULL.

Make the early exit tests in debuginfod-support.c match those in
libdebuginfod.

gdb/ChangeLog:

2020-11-18  Tom de Vries  <tdevries@suse.de>

* debuginfod-support.c (debuginfod_source_query)
(debuginfod_debuginfo_query): Also do early exit if
"(getenv (DEBUGINFOD_URLS_ENV_VAR))[0] == '\0'".
gdb/ChangeLog
gdb/debuginfod-support.c