[or-cvs] stick to nick"s nul/null convention

arma at seul.org arma at seul.org
Sat Jul 15 19:21:32 UTC 2006


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	buffers.c connection_edge.c control.c directory.c dns.c 
	rendservice.c 
Log Message:
stick to nick's nul/null convention


Index: buffers.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -p -d -r1.200 -r1.201
--- buffers.c	24 Jun 2006 02:10:21 -0000	1.200
+++ buffers.c	15 Jul 2006 19:21:30 -0000	1.201
@@ -878,14 +878,14 @@ fetch_from_buf_http(buf_t *buf,
   if (headers_out) {
     *headers_out = tor_malloc(headerlen+1);
     memcpy(*headers_out,buf->cur,headerlen);
-    (*headers_out)[headerlen] = 0; /* null terminate it */
+    (*headers_out)[headerlen] = 0; /* nul terminate it */
   }
   if (body_out) {
     tor_assert(body_used);
     *body_used = bodylen;
     *body_out = tor_malloc(bodylen+1);
     memcpy(*body_out,buf->cur+headerlen,bodylen);
-    (*body_out)[bodylen] = 0; /* null terminate it */
+    (*body_out)[bodylen] = 0; /* nul terminate it */
   }
   buf_remove_from_front(buf, headerlen+bodylen);
   return 1;

Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -p -d -r1.402 -r1.403
--- connection_edge.c	6 Jul 2006 02:44:06 -0000	1.402
+++ connection_edge.c	15 Jul 2006 19:21:30 -0000	1.403
@@ -1919,14 +1919,14 @@ parse_extended_hostname(char *address)
     s = strrchr(address,'.');
     if (!s) return 0; /* no dot, thus normal */
     if (!strcmp(s+1,"exit")) {
-      *s = 0; /* null-terminate it */
+      *s = 0; /* nul-terminate it */
       return EXIT_HOSTNAME; /* .exit */
     }
     if (strcmp(s+1,"onion"))
       return NORMAL_HOSTNAME; /* neither .exit nor .onion, thus normal */
 
     /* so it is .onion */
-    *s = 0; /* null-terminate it */
+    *s = 0; /* nul-terminate it */
     if (strlcpy(query, address, REND_SERVICE_ID_LEN+1) >=
         REND_SERVICE_ID_LEN+1)
       goto failed;

Index: control.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -p -d -r1.196 -r1.197
--- control.c	11 Jul 2006 03:33:16 -0000	1.196
+++ control.c	15 Jul 2006 19:21:30 -0000	1.197
@@ -790,7 +790,7 @@ handle_control_getconf(connection_t *con
   int v0 = STATE_IS_V0(conn->state);
 
   questions = smartlist_create();
-  (void) body_len; /* body is null-terminated; so we can ignore len. */
+  (void) body_len; /* body is nul-terminated; so we can ignore len. */
   if (v0) {
     smartlist_split_string(questions, body, "\n",
                            SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
@@ -1160,7 +1160,7 @@ handle_control_mapaddress(connection_t *
   char *r;
   size_t sz;
   int v0 = STATE_IS_V0(conn->state);
-  (void) len; /* body is null-terminated, so it's safe to ignore the length. */
+  (void) len; /* body is nul-terminated, so it's safe to ignore the length. */
 
   lines = smartlist_create();
   elts = smartlist_create();
@@ -1552,7 +1552,7 @@ handle_control_getinfo(connection_t *con
   char *msg = NULL, *ans = NULL;
   size_t msg_len;
   int v0 = STATE_IS_V0(conn->state);
-  (void) len; /* body is null-terminated, so it's safe to ignore the length. */
+  (void) len; /* body is nul-terminated, so it's safe to ignore the length. */
 
   questions = smartlist_create();
   if (v0)
@@ -1814,7 +1814,7 @@ handle_control_setpurpose(connection_t *
   routerinfo_t *ri = NULL;
   uint8_t new_purpose;
   smartlist_t *args = smartlist_create();
-  (void) len; /* body is null-terminated, so it's safe to ignore the length. */
+  (void) len; /* body is nul-terminated, so it's safe to ignore the length. */
   smartlist_split_string(args, body, " ",
                          SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
   if (smartlist_len(args)<2) {

Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.390
retrieving revision 1.391
diff -u -p -d -r1.390 -r1.391
--- directory.c	6 Jul 2006 03:05:01 -0000	1.390
+++ directory.c	15 Jul 2006 19:21:30 -0000	1.391
@@ -590,7 +590,7 @@ directory_send_command(connection_t *con
  * "\%s [http[s]://]\%s HTTP/1..."
  * \endverbatim
  * If it's well-formed, strdup the second \%s into *<b>url</b>, and
- * null-terminate it. If the url doesn't start with "/tor/", rewrite it
+ * nul-terminate it. If the url doesn't start with "/tor/", rewrite it
  * so it does. Return 0.
  * Otherwise, return -1.
  */

Index: dns.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dns.c,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -p -d -r1.197 -r1.198
--- dns.c	11 Jul 2006 20:51:58 -0000	1.197
+++ dns.c	15 Jul 2006 19:21:30 -0000	1.198
@@ -941,7 +941,7 @@ dnsworker_main(void *data)
       crypto_thread_cleanup();
       spawn_exit();
     }
-    address[address_len] = 0; /* null terminate it */
+    address[address_len] = 0; /* nul terminate it */
 
     log_address = esc_for_log(safe_str(address));
     result = tor_lookup_hostname(address, &ip);

Index: rendservice.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/rendservice.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -p -d -r1.162 -r1.163
--- rendservice.c	6 Jul 2006 02:44:06 -0000	1.162
+++ rendservice.c	15 Jul 2006 19:21:30 -0000	1.163
@@ -518,7 +518,7 @@ rend_service_introduce(circuit_t *circui
     ptr=memchr(rp_nickname,0,nickname_field_len);
     if (!ptr || ptr == rp_nickname) {
       log_warn(LD_PROTOCOL,
-               "Couldn't find a null-padded nickname in INTRODUCE2 cell.");
+               "Couldn't find a nul-padded nickname in INTRODUCE2 cell.");
       return -1;
     }
     if ((version == 0 && !is_legal_nickname(rp_nickname)) ||



More information about the tor-commits mailing list