[PATCH 27/31] virPCIVPDParseVPDLargeResourceFields: Remove impossible 'default' swithch case

Peter Krempa posted 31 patches 7 months, 1 week ago
[PATCH 27/31] virPCIVPDParseVPDLargeResourceFields: Remove impossible 'default' swithch case
Posted by Peter Krempa 7 months, 1 week ago
The 'fieldFormat' variable is guaranteed to have only the proper enum
values by virPCIVPDResourceGetFieldValueFormat.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/util/virpcivpd.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd.c
index ba05014e40..25c4c2c5ec 100644
--- a/src/util/virpcivpd.c
+++ b/src/util/virpcivpd.c
@@ -470,9 +470,6 @@ virPCIVPDParseVPDLargeResourceFields(int vpdFileFd, uint16_t resPos, uint16_t re
                 VIR_DEBUG("Could not determine a field value format for keyword: %s", fieldKeyword);
                 bytesToRead = fieldDataLen;
                 break;
-            default:
-                VIR_INFO("Unexpected field value format encountered.");
-                return false;
         }

         if (resPos + resDataLen < fieldPos + fieldDataLen) {
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH 27/31] virPCIVPDParseVPDLargeResourceFields: Remove impossible 'default' swithch case
Posted by Ján Tomko 7 months, 1 week ago
*switch

Jano

On a Tuesday in 2024, Peter Krempa wrote:
>The 'fieldFormat' variable is guaranteed to have only the proper enum
>values by virPCIVPDResourceGetFieldValueFormat.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/util/virpcivpd.c | 3 ---
> 1 file changed, 3 deletions(-)
>
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org