summaryrefslogtreecommitdiff
path: root/lib/xgethostname.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-06-11 17:18:58 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-06-11 17:20:13 -0700
commit00a11ae0d681fb7b33bd877ab9d904c389f66c3d (patch)
treeede056be77224611ffbc68ae0b4b74a6270f8598 /lib/xgethostname.c
parent3672ae90461db1dc3381ab780ab37bd094871be8 (diff)
downloadgnulib-00a11ae0d681fb7b33bd877ab9d904c389f66c3d.tar.gz
xgethostname: prefer idx_t for indexes
* lib/xgethostname.c (XGETANAME): Prefer idx_t to size_t for indexes, using idx_t-related allocators.
Diffstat (limited to 'lib/xgethostname.c')
-rw-r--r--lib/xgethostname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xgethostname.c b/lib/xgethostname.c
index 87ae6dce87..84c2f279bb 100644
--- a/lib/xgethostname.c
+++ b/lib/xgethostname.c
@@ -59,7 +59,7 @@ XGETANAME (void)
specify whether a truncated name is null-terminated. */
idx_t actual_size = strlen (name) + 1;
if (actual_size < size_1)
- return alloc ? alloc : xmemdup (name, actual_size);
+ return alloc ? alloc : ximemdup (name, actual_size);
errno = 0;
}
free (alloc);