[or-cvs] r13594: call a "number of characters" a size_t, not an int (tor/trunk/src/or)

arma at seul.org arma at seul.org
Tue Feb 19 22:52:50 UTC 2008


Author: arma
Date: 2008-02-19 17:52:50 -0500 (Tue, 19 Feb 2008)
New Revision: 13594

Modified:
   tor/trunk/src/or/buffers.c
Log:
call a "number of characters" a size_t, not an int


Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c	2008-02-19 22:46:19 UTC (rev 13593)
+++ tor/trunk/src/or/buffers.c	2008-02-19 22:52:50 UTC (rev 13594)
@@ -1056,7 +1056,7 @@
 /** Return true iff the <b>n</b>-character string in <b>s</b> appears
  * (verbatim) at <b>pos</b>. */
 static int
-buf_matches_at_pos(const buf_pos_t *pos, const char *s, int n)
+buf_matches_at_pos(const buf_pos_t *pos, const char *s, size_t n)
 {
   buf_pos_t p;
   memcpy(&p, pos, sizeof(p));
@@ -1076,7 +1076,7 @@
 /** Return the first position in <b>buf</b> at which the <b>n</b>-character
  * string <b>s</b> occurs, or -1 if it does not occur. */
 static int
-buf_find_string_offset(const buf_t *buf, const char *s, int n)
+buf_find_string_offset(const buf_t *buf, const char *s, size_t n)
 {
   buf_pos_t pos;
   buf_pos_init(buf, &pos);



More information about the tor-commits mailing list