static const char *next_s32(const char *s, int *num, int *rc)
{
	char *end = NULL;

	if (!s || !*s)
		return s;

	errno = 0;
	*rc = -EINVAL;
	*num = strtol(s, &end, 10);
	if (end == NULL || s == end)
	       return s;
	if (errno == 0 && (*end == ' ' || *end == '\t' || *end == '\0'))
		*rc = 0;
	return end;
}
static const char *next_s32(const char *s, int *num, int *rc)
{
	char *end = NULL;

	if (!s || !*s)
		return s;

	errno = 0;
	*rc = -EINVAL;
	*num = strtol(s, &end, 10);
	if (end == NULL || s == end)
	       return s;
	if (errno == 0 && (*end == ' ' || *end == '\t' || *end == '\0'))
		*rc = 0;
	return end;
}