Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/sdpquery use size_t to satisfy lint



details:   https://anonhg.NetBSD.org/src/rev/e5236b3f0c66
branches:  trunk
changeset: 766522:e5236b3f0c66
user:      plunky <plunky%NetBSD.org@localhost>
date:      Sat Jun 25 09:16:52 2011 +0000

description:
use size_t to satisfy lint

diffstat:

 usr.bin/sdpquery/print.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r 96a7d3d69145 -r e5236b3f0c66 usr.bin/sdpquery/print.c
--- a/usr.bin/sdpquery/print.c  Sat Jun 25 05:50:14 2011 +0000
+++ b/usr.bin/sdpquery/print.c  Sat Jun 25 09:16:52 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print.c,v 1.13 2011/06/24 20:53:56 plunky Exp $        */
+/*     $NetBSD: print.c,v 1.14 2011/06/25 09:16:52 plunky Exp $        */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: print.c,v 1.13 2011/06/24 20:53:56 plunky Exp $");
+__RCSID("$NetBSD: print.c,v 1.14 2011/06/25 09:16:52 plunky Exp $");
 
 #include <ctype.h>
 #include <iconv.h>
@@ -67,7 +67,7 @@
 static const char *string_vis(int, const char *, size_t);
 
 static void print_hexdump(const char *, const uint8_t *, size_t);
-static bool print_attribute(uint16_t, sdp_data_t *, attr_t *, int);
+static bool print_attribute(uint16_t, sdp_data_t *, attr_t *, size_t);
 static bool print_universal_attribute(uint16_t, sdp_data_t *);
 static bool print_language_attribute(uint16_t, sdp_data_t *);
 static bool print_service_attribute(uint16_t, sdp_data_t *);
@@ -481,7 +481,8 @@
        while (sdp_get_attr(rec, &id, &value)) {
                if (Xflag) {
                        printf("AttributeID 0x%04x:\n", id);
-                       print_hexdump("     ", value.next, value.end - value.next);
+                       print_hexdump("     ", value.next,
+                           (size_t)(value.end - value.next));
                } else if (Rflag) {
                        printf("AttributeID 0x%04x:\n", id);
                        sdp_data_print(&value, 4);
@@ -585,9 +586,9 @@
 }
 
 static bool
-print_attribute(uint16_t id, sdp_data_t *value, attr_t *attr, int count)
+print_attribute(uint16_t id, sdp_data_t *value, attr_t *attr, size_t count)
 {
-       int i;
+       size_t i;
 
        for (i = 0; i < count; i++) {
                if (id == attr[i].id) {



Home | Main Index | Thread Index | Old Index