GNUTLS: Improve rb_connect_tcp_ssl() and rb_ssl_start_connected()
Use the variable name instead of its type as an argument to a sizeof allocation. This will prevent possible future errors being introduced when the type of the variable is changed, but the sizeof argument is not updated.
This commit is contained in:
parent
f4726edf7a
commit
2b5bf0bada
1 changed files with 2 additions and 2 deletions
|
@ -673,7 +673,7 @@ rb_connect_tcp_ssl(rb_fde_t *const F, struct sockaddr *const dest, struct sockad
|
||||||
if(F == NULL)
|
if(F == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
struct ssl_connect *const sconn = rb_malloc(sizeof(struct ssl_connect));
|
struct ssl_connect *const sconn = rb_malloc(sizeof *sconn);
|
||||||
sconn->data = data;
|
sconn->data = data;
|
||||||
sconn->callback = callback;
|
sconn->callback = callback;
|
||||||
sconn->timeout = timeout;
|
sconn->timeout = timeout;
|
||||||
|
@ -687,7 +687,7 @@ rb_ssl_start_connected(rb_fde_t *const F, CNCB *const callback, void *const data
|
||||||
if(F == NULL)
|
if(F == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
struct ssl_connect *const sconn = rb_malloc(sizeof(struct ssl_connect));
|
struct ssl_connect *const sconn = rb_malloc(sizeof *sconn);
|
||||||
sconn->data = data;
|
sconn->data = data;
|
||||||
sconn->callback = callback;
|
sconn->callback = callback;
|
||||||
sconn->timeout = timeout;
|
sconn->timeout = timeout;
|
||||||
|
|
Loading…
Reference in a new issue