summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-05 22:24:36 +0200
committerSven Eden <yamakuzure@gmx.net>2017-06-16 10:12:58 +0200
commit34a47924489b195799b36932f56db80f2d4e1ab6 (patch)
tree067936d960bb2b0f88f24c18fa4615fd14defc43 /src/shared
parenta799bc503d6055ecc97fce94d0685fdfe055a3f4 (diff)
tree-wide: introduce new SOCKADDR_UN_LEN() macro, and use it everywhere
The macro determines the right length of a AF_UNIX "struct sockaddr_un" to pass to connect() or bind(). It automatically figures out if the socket refers to an abstract namespace socket, or a socket in the file system, and properly handles the full length of the path field. This macro is not only safer, but also simpler to use, than the usual offsetof() + strlen() logic.
Diffstat (limited to 'src/shared')
0 files changed, 0 insertions, 0 deletions