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

[Xen-devel] [PATCH] efi: mark input variables to funcs as const



Variables that are input (IN) variables to EFI functions should be
marked as const. Just avoid potential problems of changing data that
shouldn't be changed.

Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx>
---

So I find myself constantly doing something similar to this when
troubleshooting EFI because I like to put print statements to see data
and figure out where problems are. The EFI print functions all take const
data but much of the data is not marked as const. If you don't like this
that's fine but I was looking at the 3 different EFI branches I have locally
and this change is in all 3 in one shape or another.

---
 xen/include/efi/efidef.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/efi/efidef.h b/xen/include/efi/efidef.h
index 86a7e11..1d1c779 100644
--- a/xen/include/efi/efidef.h
+++ b/xen/include/efi/efidef.h
@@ -50,7 +50,7 @@ typedef VOID            *EFI_EVENT;
 //
 
 #ifndef IN
-    #define IN
+    #define IN const
     #define OUT
     #define OPTIONAL
 #endif
-- 
2.4.10


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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