diff --git a/src/common/crypto.c b/src/common/crypto.c index 200c74a27c..bc1ca6945e 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -509,7 +509,7 @@ crypto_pk_write_public_key_to_string(crypto_pk_env_t *env, char **dest, tor_assert(buf->length >= 0); *dest = tor_malloc(buf->length+1); memcpy(*dest, buf->data, buf->length); - (*dest)[buf->length] = 0; /* null terminate it */ + (*dest)[buf->length] = 0; /* nul terminate it */ *len = buf->length; BUF_MEM_free(buf); diff --git a/src/or/buffers.c b/src/or/buffers.c index 86741e9733..69cfd30d36 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -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; diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 508c2a65be..41948e055c 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -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; diff --git a/src/or/control.c b/src/or/control.c index 48139f3ce6..c2d86f8c7d 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -790,7 +790,7 @@ handle_control_getconf(connection_t *conn, uint32_t body_len, const char *body) 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 *conn, uint32_t len, const char *body) 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 *conn, uint32_t len, const char *body) 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 *conn, int for_circuits, 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) { diff --git a/src/or/directory.c b/src/or/directory.c index fd787cc872..dd920893eb 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -590,7 +590,7 @@ directory_send_command(connection_t *conn, const char *platform, * "\%s [http[s]://]\%s HTTP/1..." * \endverbatim * If it's well-formed, strdup the second \%s into *url, 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. */ diff --git a/src/or/dns.c b/src/or/dns.c index 046bd5e6a5..fe02811695 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -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); diff --git a/src/or/rendservice.c b/src/or/rendservice.c index e6b2ca8cb4..ce3ca478c7 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -518,7 +518,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, 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)) ||