/* This function assumes the supplied destination buffer is large enough to accommodate the name.  */
static void stats_gen_name(int idx, char *dst)
/* This function assumes the supplied destination buffer is large enough to accommodate the name.  */
static void stats_gen_name(int idx, char *dst)
{
	char c;
	int len;
	int i;
	len = 0;
	do {
		dst[len++] = '0' + idx % 10;
		idx /= 10;
	} while (idx > 0);
	dst[len++] = 's';
	for (i = 0; i < len / 2; i++) {
		c = dst[i];
		dst[i] = dst[len - i - 1];
		dst[len - i - 1] = c;
	}
	dst[len] = '\0';
}