Let's bring the version string character set into a systematic order,
matching the order in which they appear and are defined in the UAPI.10
specification text.
This makes it easier to compare the relevant functions.
return false;
/* This is a superset of the characters used by semver. We additionally allow "_". */
- if (!in_charset(s, ALPHANUMERICAL "._-+"))
+ if (!in_charset(s, ALPHANUMERICAL ".-+_"))
return false;
return true;
}
bool version_is_valid_versionspec(const char *s) {
+
if (!filename_part_is_valid(s))
return false;
- if (!in_charset(s, ALPHANUMERICAL "-.~^"))
+ if (!in_charset(s, ALPHANUMERICAL ".-~^"))
return false;
return true;