The function does not reject '&', '<', '>' contrary to
what it actually
states. Move and adjust the comment.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/util/virpcivpd.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd.c
index 39557c7347..248a9b2790 100644
--- a/src/util/virpcivpd.c
+++ b/src/util/virpcivpd.c
@@ -167,19 +167,15 @@ virPCIVPDResourceGetFieldValueFormat(const char *keyword)
* value or text field value. The expectations are based on the keywords specified
* in relevant sections of PCI(e) specifications
* ("I.3. VPD Definitions" in PCI specs, "6.28.1 VPD Format" PCIe
4.0).
+ *
+ * The PCI(e) specs mention alphanumeric characters when talking about text fields
+ * and the string resource but also include spaces and dashes in the provided example.
+ * Dots, commas, equal signs have also been observed in values used by major device
vendors.
*/
bool
virPCIVPDResourceIsValidTextValue(const char *value)
{
size_t i = 0;
- /*
- * The PCI(e) specs mention alphanumeric characters when talking about text fields
- * and the string resource but also include spaces and dashes in the provided
example.
- * Dots, commas, equal signs have also been observed in values used by major device
vendors.
- * The specs do not specify a full set of allowed code points and for Libvirt it is
important
- * to keep values in the ranges allowed within XML elements (mainly excluding
less-than,
- * greater-than and ampersand).
- */
if (value == NULL)
return false;
--
2.43.0