memset, memcpy, sizeof consistency fixes
Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -81,7 +81,7 @@ void main ()
|
||||
|
||||
listen_sd = socket (AF_INET, SOCK_STREAM, 0); CHK_ERR(listen_sd, "socket");
|
||||
|
||||
memset (&sa_serv, '\0', sizeof(sa_serv));
|
||||
memset(&sa_serv, 0, sizeof(sa_serv));
|
||||
sa_serv.sin_family = AF_INET;
|
||||
sa_serv.sin_addr.s_addr = INADDR_ANY;
|
||||
sa_serv.sin_port = htons (1111); /* Server Port number */
|
||||
|
Reference in New Issue
Block a user