Skip to content

Commit

Permalink
Comments: clarify remaining return statements
Browse files Browse the repository at this point in the history
  • Loading branch information
gperciva committed Aug 8, 2024
1 parent 51a6f69 commit 5dc8e90
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions datastruct/elasticarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ void *
elasticarray_get(struct elasticarray * EA, size_t pos, size_t reclen)
{

/* Calculate the pointer address. */
return ((uint8_t *)(EA->buf) + pos * reclen);
}

Expand Down
1 change: 1 addition & 0 deletions datastruct/timerqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ compar(void * cookie, const void * x, const void * y)

(void)cookie; /* UNUSED */

/* Compare the times. */
return (tvcmp(&_x->tv, &_y->tv));
}

Expand Down
1 change: 1 addition & 0 deletions http/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ http_request(struct sock_addr * const * addrs, struct http_request * request,
void * cookie)
{

/* Call the real function (without SSL). */
return (http_request2(addrs, request, maxrlen, callback, cookie, NULL));
}

Expand Down
1 change: 1 addition & 0 deletions netbuf/netbuf_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct netbuf_read *
netbuf_read_init(int s)
{

/* Call the real function (without SSL). */
return (netbuf_read_init2(s, NULL));
}

Expand Down
1 change: 1 addition & 0 deletions netbuf/netbuf_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ struct netbuf_write *
netbuf_write_init(int s, int (* fail_callback)(void *), void * fail_cookie)
{

/* Call the real function (without SSL). */
return (netbuf_write_init2(s, NULL, fail_callback, fail_cookie));
}

Expand Down
2 changes: 2 additions & 0 deletions network_ssl/network_ssl_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ network_ssl_compat_set1_host(SSL * ssl, const char * hostname)
X509_VERIFY_PARAM * param;

param = SSL_get0_param(ssl);

/* Use older OpenSSL function. */
return (X509_VERIFY_PARAM_set1_host(param, hostname, strlen(hostname)));
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions util/align_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ align_ptr(uint8_t * arr, size_t alignment)
*/
offset = (uintptr_t)(&arr[0]) % alignment;
offset = (alignment - offset) % alignment;

/* Return the aligned pointer. */
return ((void *)&arr[offset]);
}

Expand Down
2 changes: 2 additions & 0 deletions util/json.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ skip_number(const uint8_t * buf, const uint8_t * end)
break;
buf++;
}

/* Return our current position. */
return (buf);
}

Expand Down

0 comments on commit 5dc8e90

Please sign in to comment.