* lib/xgethostname.c (XGETANAME):
Prefer idx_t to size_t for indexes, using idx_t-related allocators.
* lib/savedir.c (streamsavedir):
* lib/stack.h (_GL_STACK_TYPE, _GL_STACK_PREFIX):
* lib/userspec.c (parse_with_separator):
+ * lib/xgethostname.c (XGETANAME):
Prefer idx_t to size_t for indexes, and use idx_t-related allocators.
* lib/basename.c: Do not include xstrndup.h.
(basename): Simplify by always using memcpy.
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);