[PATCH spice-common v2] canvas_base: Allow to specify constant operations

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

 



There's no need for the canvas operations to be changed.
This allows without casts to have the operation structures
constants in the code.
This potentially allows to reduce attack surface having some
more data constant instead or read/write.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 common/canvas_base.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Changes since v1:
- fix typo in commit message

diff --git a/common/canvas_base.h b/common/canvas_base.h
index 78e6368..2d3c35b 100644
--- a/common/canvas_base.h
+++ b/common/canvas_base.h
@@ -60,7 +60,7 @@ typedef struct {
 } SpiceImageCacheOps;
 
 struct _SpiceImageCache {
-  SpiceImageCacheOps *ops;
+  const SpiceImageCacheOps *ops;
 };
 
 typedef struct {
@@ -69,7 +69,7 @@ typedef struct {
 } SpiceImageSurfacesOps;
 
 struct _SpiceImageSurfaces {
- SpiceImageSurfacesOps *ops;
+ const SpiceImageSurfacesOps *ops;
 };
 
 typedef struct {
-- 
2.13.6

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]