systemd/sdDaemon: initialize sockaddr_un
This commit is contained in:
parent
1761909bca
commit
32978176b1
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ int NSystemd::sdNotify(int unsetEnvironment, const char* state) {
|
|||
// address length must be at most this; see man 7 unix
|
||||
size_t addrLen = strnlen(addr, 107);
|
||||
|
||||
struct sockaddr_un unixAddr;
|
||||
struct sockaddr_un unixAddr = {0};
|
||||
unixAddr.sun_family = AF_UNIX;
|
||||
strncpy(unixAddr.sun_path, addr, addrLen);
|
||||
if (unixAddr.sun_path[0] == '@')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue