Module Name:    src
Committed By:   christos
Date:           Tue Oct 25 00:02:30 UTC 2011

Modified Files:
        src/lib/libisns: isns.h isns_pdu.c

Log Message:
make length unsigned.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/lib/libisns/isns.h \
    src/lib/libisns/isns_pdu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libisns/isns.h
diff -u src/lib/libisns/isns.h:1.1.1.1 src/lib/libisns/isns.h:1.2
--- src/lib/libisns/isns.h:1.1.1.1	Sat Jan 15 20:22:50 2011
+++ src/lib/libisns/isns.h	Mon Oct 24 20:02:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: isns.h,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $	*/
+/*	$NetBSD: isns.h,v 1.2 2011/10/25 00:02:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@@ -59,8 +59,8 @@ void isns_stop(ISNS_HANDLE);
 ISNS_TRANS isns_new_trans(ISNS_HANDLE, uint16_t, uint16_t);
 void isns_free_trans(ISNS_TRANS);
 int isns_send_trans(ISNS_TRANS, const struct timespec *, uint32_t *);
-int isns_add_tlv(ISNS_TRANS, uint32_t, int, const void *);
-int isns_get_tlv(ISNS_TRANS, int, uint32_t *, int *, void **);
+int isns_add_tlv(ISNS_TRANS, uint32_t, uint32_t, const void *);
+int isns_get_tlv(ISNS_TRANS, int, uint32_t *, uint32_t *, void **);
 
 int	isns_add_string(ISNS_TRANS, uint32_t, const char *);
 
Index: src/lib/libisns/isns_pdu.c
diff -u src/lib/libisns/isns_pdu.c:1.1.1.1 src/lib/libisns/isns_pdu.c:1.2
--- src/lib/libisns/isns_pdu.c:1.1.1.1	Sat Jan 15 20:22:50 2011
+++ src/lib/libisns/isns_pdu.c	Mon Oct 24 20:02:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: isns_pdu.c,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $	*/
+/*	$NetBSD: isns_pdu.c,v 1.2 2011/10/25 00:02:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: isns_pdu.c,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $");
+__RCSID("$NetBSD: isns_pdu.c,v 1.2 2011/10/25 00:02:30 christos Exp $");
 
 
 #include <sys/types.h>
@@ -576,7 +576,7 @@ int
 isns_add_string(ISNS_TRANS trans, uint32_t tag, const char *s)
 {
 	/* Add string, including required NULL. */
-	return isns_add_tlv(trans, tag, (int)strlen(s)+1, s);
+	return isns_add_tlv(trans, tag, (uint32_t)strlen(s) + 1, s);
 }
 
 
@@ -584,7 +584,8 @@ isns_add_string(ISNS_TRANS trans, uint32
  * isns_add_tlv - adds a TLV to an existing transaction
  */
 int
-isns_add_tlv(ISNS_TRANS trans, uint32_t tag, int data_len, const void *data_p)
+isns_add_tlv(ISNS_TRANS trans, uint32_t tag, uint32_t data_len,
+    const void *data_p)
 {
 	struct isns_trans_s *trans_p;
 	uint8_t tlv_buf[ISNS_TLV_HDR_SIZE];
@@ -629,8 +630,8 @@ isns_add_tlv(ISNS_TRANS trans, uint32_t 
  *   ENOMEM - could not allocate storage for spanning TLV data
  */
 int
-isns_get_tlv(ISNS_TRANS trans, int which_tlv, uint32_t *tag_p, int *data_len_p,
-    void **data_pp)
+isns_get_tlv(ISNS_TRANS trans, int which_tlv, uint32_t *tag_p,
+    uint32_t *data_len_p, void **data_pp)
 {
 	struct isns_trans_s *trans_p;
 	struct isns_get_tlv_info_s *info_p;

Reply via email to