diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-05 00:00:15 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-06 04:18:59 +0200 |
commit | 16f8d4ebf0fd4847fa83d9c61f4150273cb4f533 (patch) | |
tree | 3c30094cad38433c24008c30efe3d93cf38d8ae9 /demos/ssl | |
parent | ZLIB compression deserves a better comment (diff) | |
download | openssl-16f8d4ebf0fd4847fa83d9c61f4150273cb4f533.tar.xz openssl-16f8d4ebf0fd4847fa83d9c61f4150273cb4f533.zip |
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>
Diffstat (limited to 'demos/ssl')
-rw-r--r-- | demos/ssl/cli.cpp | 2 | ||||
-rw-r--r-- | demos/ssl/serv.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/demos/ssl/cli.cpp b/demos/ssl/cli.cpp index a5bee1c7b9..cb5d329ea4 100644 --- a/demos/ssl/cli.cpp +++ b/demos/ssl/cli.cpp @@ -47,7 +47,7 @@ void main () sd = socket (AF_INET, SOCK_STREAM, 0); CHK_ERR(sd, "socket"); - memset (&sa, '\0', sizeof(sa)); + memset(&sa, 0, sizeof(sa)); sa.sin_family = AF_INET; sa.sin_addr.s_addr = inet_addr ("127.0.0.1"); /* Server IP */ sa.sin_port = htons (1111); /* Server Port number */ diff --git a/demos/ssl/serv.cpp b/demos/ssl/serv.cpp index b142c758d2..6d4cefd5d0 100644 --- a/demos/ssl/serv.cpp +++ b/demos/ssl/serv.cpp @@ -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 */ |