summary refs log tree commit diff
path: root/resolv/ns_name.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-19 07:55:27 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-19 07:56:21 +0200
commit4e1d3db1e86804283cd21f3186e06d397284ac70 (patch)
treee26a645bbb5e551980fc41cb5597397d92b939e9 /resolv/ns_name.c
parentcff2c78c513ef8d51e69a6933f1c6aef8a24a6d6 (diff)
downloadglibc-4e1d3db1e86804283cd21f3186e06d397284ac70.tar.gz
glibc-4e1d3db1e86804283cd21f3186e06d397284ac70.tar.xz
glibc-4e1d3db1e86804283cd21f3186e06d397284ac70.zip
resolv: Move ns_name_uncompress into its own file and into libc
And reformat to GNU style.  Check for negative error returns
(instead of -1).

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'resolv/ns_name.c')
-rw-r--r--resolv/ns_name.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/resolv/ns_name.c b/resolv/ns_name.c
index 58d6a60ce4..35e25cbd83 100644
--- a/resolv/ns_name.c
+++ b/resolv/ns_name.c
@@ -330,30 +330,6 @@ cleanup:
 libresolv_hidden_def (ns_name_pack)
 
 /*%
- *	Expand compressed domain name to presentation format.
- *
- * return:
- *\li	Number of bytes read out of `src', or -1 (with errno set).
- *
- * note:
- *\li	Root domain returns as "." not "".
- */
-int
-ns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src,
-		   char *dst, size_t dstsiz)
-{
-	u_char tmp[NS_MAXCDNAME];
-	int n;
-
-	if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
-		return (-1);
-	if (__ns_name_ntop (tmp, dst, dstsiz) == -1)
-		return (-1);
-	return (n);
-}
-libresolv_hidden_def (ns_name_uncompress)
-
-/*%
  *	Compress a domain name into wire format, using compression pointers.
  *
  * return: