summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-07 02:34:17 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-07 02:34:17 +0200
commit0e098b15c76e222f7de381203c0c35a75a5b2f24 (patch)
tree864b2b06696c7fcc4d0c29daa3121574c52f004b /src/manager.c
parente983b76024342278a0377eae116c925f2567776e (diff)
util: never use sizeof(sa_family_t) when calculating sockaddr sizes
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index c062cfb5ed..4ee04e181f 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -92,7 +92,7 @@ static int manager_setup_notify(Manager *m) {
else
strncpy(sa.un.sun_path+1, NOTIFY_SOCKET, sizeof(sa.un.sun_path)-1);
- if (bind(m->notify_watch.fd, &sa.sa, sizeof(sa_family_t) + 1 + strlen(sa.un.sun_path+1)) < 0) {
+ if (bind(m->notify_watch.fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1)) < 0) {
log_error("bind() failed: %m");
return -errno;
}