sockets(examples): remove unused register, replace bzero with memset
- Remove the redundant register keyword from the variables, as most
compilers (GCC/Clang) just ignore them, and they're mostly just noise.
- Replace bzero() with memset(). IEEE 1003.1-2008 removes the spec of
bzero(), replacing it with memset().
- Use socklen_t (unsigned type) for variable b in the socket bind
example.
- Add unistd.h header file in the socket connect example (it is used by
the write() and read() libc calls). Remove unnecessary (char *) cast
from argv[1].
Signed-off-by: rilysh <nightquick@proton.me>
Reviewed-by: emaste@