[cacard 2/5] hex_dump: Mark source data as const

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

 



hex_dump() is not going to modify it.

Signed-off-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>
---
 src/common.c | 2 +-
 src/common.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common.c b/src/common.c
index 6f835df..0e90b0e 100644
--- a/src/common.c
+++ b/src/common.c
@@ -56,7 +56,7 @@ static char hexdump_buffer[5*MAX_STATIC_BYTES];
  * can hold up to 1024 bytes (longer will get truncated).
  */
 char *
-hex_dump(unsigned char *buf, size_t buflen)
+hex_dump(const unsigned char *buf, size_t buflen)
 {
     char *p, *start;
     size_t i;
diff --git a/src/common.h b/src/common.h
index 0336273..5210367 100644
--- a/src/common.h
+++ b/src/common.h
@@ -29,6 +29,6 @@
 unsigned char *ushort2lebytes(unsigned char *buf, unsigned short x);
 unsigned short lebytes2ushort(const unsigned char *buf);
 
-char *hex_dump(unsigned char *buf, size_t buflen);
+char *hex_dump(const unsigned char *buf, size_t buflen);
 
 #endif
-- 
2.17.1

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




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