aboutsummaryrefslogtreecommitdiffstats
path: root/man7/unix.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-02-03 13:10:04 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-02-03 14:08:29 +0100
commit24a31d632b2763f2792895ae34aeb51dac643b98 (patch)
tree0d69fc24c9461b0337bc60aa219b8fc600d274dc /man7/unix.7
parentaf54e3b7163998cbe1f487f4dca040615fbf949b (diff)
downloadman-pages-24a31d632b2763f2792895ae34aeb51dac643b98.tar.gz
accept.2, bind.2, connect.2, getpeername.2, getsockname.2, recv.2, recvmmsg.2, select_tut.2, send.2, sendmmsg.2, getaddrinfo.3, getnameinfo.3, epoll.7, unix.7: Use consistent argument/variable names for socket addresses and lengths
As noted by Carlos, there's quite a bit of inconsistency across pages. Use 'addr' and 'addrlen' consistently in variables and function arguments. Cowritten-by: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/unix.7')
-rw-r--r--man7/unix.712
1 files changed, 6 insertions, 6 deletions
diff --git a/man7/unix.7 b/man7/unix.7
index e069348515..94d9210536 100644
--- a/man7/unix.7
+++ b/man7/unix.7
@@ -817,7 +817,7 @@ main(int argc, char *argv[])
int
main(int argc, char *argv[])
{
- struct sockaddr_un name;
+ struct sockaddr_un addr;
int i;
int ret;
int data_socket;
@@ -837,14 +837,14 @@ main(int argc, char *argv[])
* the structure.
*/
- memset(&name, 0, sizeof(struct sockaddr_un));
+ memset(&addr, 0, sizeof(struct sockaddr_un));
- /* Connect socket to socket name. */
+ /* Connect socket to socket address */
- name.sun_family = AF_UNIX;
- strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) \- 1);
+ addr.sun_family = AF_UNIX;
+ strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) \- 1);
- ret = connect (data_socket, (const struct sockaddr *) &name,
+ ret = connect (data_socket, (const struct sockaddr *) &addr,
sizeof(struct sockaddr_un));
if (ret == \-1) {
fprintf(stderr, "The server is down.\\n");