diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-07-19 07:55:27 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-07-19 07:56:21 +0200 |
commit | 762a2b2d341a9d6a4ea088479616907c5b4e9a7b (patch) | |
tree | ac4897b58ae029f947c3033444044e1c54ad3389 /resolv/ns_print.c | |
parent | 08d4a98070c4c4f69c6d04f483d105121effba08 (diff) | |
download | glibc-762a2b2d341a9d6a4ea088479616907c5b4e9a7b.zip glibc-762a2b2d341a9d6a4ea088479616907c5b4e9a7b.tar.gz glibc-762a2b2d341a9d6a4ea088479616907c5b4e9a7b.tar.bz2 |
resolv: Move ns_samename into its own file, and into libc
But only as an internal symbol, __libc_ns_samename. The libresolv
ABI is preserved. This is because the function is deprecated, and
it does not make sense to add new symbol versions for deprecated
functions.
Also reformat the implementation to GNU style.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'resolv/ns_print.c')
-rw-r--r-- | resolv/ns_print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resolv/ns_print.c b/resolv/ns_print.c index 9a9602d..43f39ed 100644 --- a/resolv/ns_print.c +++ b/resolv/ns_print.c @@ -103,9 +103,9 @@ ns_sprintrrf(const u_char *msg, size_t msglen, /* * Owner. */ - if (name_ctx != NULL && ns_samename(name_ctx, name) == 1) { + if (name_ctx != NULL && __libc_ns_samename (name_ctx, name) == 1) T(addstr("\t\t\t", 3, &buf, &buflen)); - } else { + else { len = prune_origin(name, origin); if (*name == '\0') { goto root; @@ -621,7 +621,7 @@ prune_origin(const char *name, const char *origin) { const char *oname = name; while (*name != '\0') { - if (origin != NULL && ns_samename(name, origin) == 1) + if (origin != NULL && __libc_ns_samename (name, origin) == 1) return (name - oname - (name > oname)); while (*name != '\0') { if (*name == '\\') { |