[Pkg-privacy-commits] [libotr] 09/225: * src/tlv.h: * src/tlv.c (otrl_tlv_new, otrl_tlv_parse): Add missing "const"s.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:44:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository libotr.

commit 9e2d31a5e76a8c4e51510e7050184bc307e4edb4
Author: cypherpunk <cypherpunk>
Date:   Fri Jul 29 14:09:47 2005 +0000

    	* src/tlv.h:
    	* src/tlv.c (otrl_tlv_new, otrl_tlv_parse): Add missing "const"s.
---
 ChangeLog | 5 +++++
 src/tlv.c | 4 ++--
 src/tlv.h | 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3f463bc..af01053 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-29
+
+	* src/tlv.h:
+	* src/tlv.c (otrl_tlv_new, otrl_tlv_parse): Add missing "const"s.
+
 2005-06-24
 
 	* README:
diff --git a/src/tlv.c b/src/tlv.c
index 3da549f..ea9c854 100644
--- a/src/tlv.c
+++ b/src/tlv.c
@@ -25,7 +25,7 @@
 
 /* Make a single TLV, copying the supplied data */
 OtrlTLV *otrl_tlv_new(unsigned short type, unsigned short len,
-	unsigned char *data)
+	const unsigned char *data)
 {
     OtrlTLV *tlv = malloc(sizeof(OtrlTLV));
     assert(tlv != NULL);
@@ -40,7 +40,7 @@ OtrlTLV *otrl_tlv_new(unsigned short type, unsigned short len,
 }
 
 /* Construct a chain of TLVs from the given data */
-OtrlTLV *otrl_tlv_parse(unsigned char *serialized, size_t seriallen)
+OtrlTLV *otrl_tlv_parse(const unsigned char *serialized, size_t seriallen)
 {
     OtrlTLV *tlv = NULL;
     OtrlTLV **tlvp = &tlv;
diff --git a/src/tlv.h b/src/tlv.h
index dbbdc51..0fceace 100644
--- a/src/tlv.h
+++ b/src/tlv.h
@@ -38,10 +38,10 @@ typedef struct s_OtrlTLV {
 
 /* Make a single TLV, copying the supplied data */
 OtrlTLV *otrl_tlv_new(unsigned short type, unsigned short len,
-	unsigned char *data);
+	const unsigned char *data);
 
 /* Construct a chain of TLVs from the given data */
-OtrlTLV *otrl_tlv_parse(unsigned char *serialized, size_t seriallen);
+OtrlTLV *otrl_tlv_parse(const unsigned char *serialized, size_t seriallen);
 
 /* Deallocate a chain of TLVs */
 void otrl_tlv_free(OtrlTLV *tlv);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libotr.git



More information about the Pkg-privacy-commits mailing list