projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
af_unix: Use offsetof() instead of sizeof().
[linux-2.6-microblaze.git]
/
net
/
unix
/
diag.c
diff --git
a/net/unix/diag.c
b/net/unix/diag.c
index
7e7d7f4
..
db555f2
100644
(file)
--- a/
net/unix/diag.c
+++ b/
net/unix/diag.c
@@
-19,7
+19,8
@@
static int sk_diag_dump_name(struct sock *sk, struct sk_buff *nlskb)
if (!addr)
return 0;
- return nla_put(nlskb, UNIX_DIAG_NAME, addr->len - sizeof(short),
+ return nla_put(nlskb, UNIX_DIAG_NAME,
+ addr->len - offsetof(struct sockaddr_un, sun_path),
addr->name->sun_path);
}