[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 14/21] settings: fix annotation of SettingsSave and SettingsRestore


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Date: Mon, 12 Oct 2026 12:23:26 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:In-Reply-To:References:Feedback-ID"
  • Cc: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Delivery-date: Mon, 12 Oct 2026 10:23:57 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

SettingsSave() and SettingsRestore() can be called with Alias and Description
set to Null, and in both cases they are only called in a log operation at:
Info("FROM %ws (%ws)\n", Alias, Description);
Which will print "(null)" so just annotate them as _In_opt_.

Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
 src/xenvif/settings.c | 8 ++++----
 src/xenvif/settings.h | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/xenvif/settings.c b/src/xenvif/settings.c
index b619da4..0f603e2 100644
--- a/src/xenvif/settings.c
+++ b/src/xenvif/settings.c
@@ -531,8 +531,8 @@ fail1:
 NTSTATUS
 SettingsSave(
     _In_ PSTR       SubKeyName,
-    _In_ PWSTR      Alias,
-    _In_ PWSTR      Description,
+    _In_opt_ PWSTR  Alias,
+    _In_opt_ PWSTR  Description,
     _In_ LPGUID     InterfaceGuid,
     _In_ PNET_LUID  InterfaceLuid
     )
@@ -602,8 +602,8 @@ fail1:
 NTSTATUS
 SettingsRestore(
     _In_ PSTR       SubKeyName,
-    _In_ PWSTR      Alias,
-    _In_ PWSTR      Description,
+    _In_opt_ PWSTR  Alias,
+    _In_opt_ PWSTR  Description,
     _In_ LPGUID     InterfaceGuid,
     _In_ PNET_LUID  InterfaceLuid
     )
diff --git a/src/xenvif/settings.h b/src/xenvif/settings.h
index e3a340c..9cfaac5 100644
--- a/src/xenvif/settings.h
+++ b/src/xenvif/settings.h
@@ -36,8 +36,8 @@
 extern NTSTATUS
 SettingsSave(
     _In_ PSTR       SubKeyName,
-    _In_ PWSTR      Alias,
-    _In_ PWSTR      Description,
+    _In_opt_ PWSTR  Alias,
+    _In_opt_ PWSTR  Description,
     _In_ LPGUID     InterfaceGuid,
     _In_ PNET_LUID  InterfaceLuid
     );
@@ -45,8 +45,8 @@ SettingsSave(
 extern NTSTATUS
 SettingsRestore(
     _In_ PSTR       SubKeyName,
-    _In_ PWSTR      Alias,
-    _In_ PWSTR      Description,
+    _In_opt_ PWSTR  Alias,
+    _In_opt_ PWSTR  Description,
     _In_ LPGUID     InterfaceGuid,
     _In_ PNET_LUID  InterfaceLuid
     );
-- 
2.55.0.windows.5



--
Césaire Mounah | Vates Windows Guest Tools Engineer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.