<div dir="ltr">Hi:<div>
<span style="color:rgb(67,67,67);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(252,252,254);float:none;display:inline">When I look at XCB communication,</span><br></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(252,252,254);float:none;display:inline;font-size:14px"><font color="#434343" face="Arial, sans-serif"><div>static int _xcb_open_abstract(char *protocol, const char *file, size_t filelen)</div><div>{</div><div> int fd;</div><div> struct sockaddr_un addr = {0};</div><div> socklen_t namelen;</div><div><br></div><div> if (protocol && strcmp("unix",protocol))</div><div> return -1;</div><div><br></div><div> strcpy(addr.sun_path + 1, file);</div><div> addr.sun_family = AF_UNIX;</div><div> namelen = offsetof(struct sockaddr_un, sun_path) + 1 + filelen;</div><div> 。。。。。。</div><div>}</div><div>
<span style="color:rgb(67,67,67);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(252,252,254);float:none;display:inline">Why do we add one to addr->sun_path?</span>
</div></font></span></div></div>