Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110761292
D34725.id105391.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
685 B
Referenced Files
None
Subscribers
None
D34725.id105391.diff
View Options
diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c
--- a/sys/compat/linux/linux.c
+++ b/sys/compat/linux/linux.c
@@ -400,28 +400,20 @@
socklen_t len)
{
struct l_sockaddr *kosa;
- int error, bdom;
+ int bdom;
*lsa = NULL;
if (len < 2 || len > UCHAR_MAX)
return (EINVAL);
+ bdom = bsd_to_linux_domain(sa->sa_family);
+ if (bdom == -1)
+ return (EAFNOSUPPORT);
kosa = malloc(len, M_SONAME, M_WAITOK);
bcopy(sa, kosa, len);
-
- bdom = bsd_to_linux_domain(sa->sa_family);
- if (bdom == -1) {
- error = EAFNOSUPPORT;
- goto out;
- }
-
kosa->sa_family = bdom;
*lsa = kosa;
return (0);
-
-out:
- free(kosa, M_SONAME);
- return (error);
}
int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 6:52 PM (12 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16785406
Default Alt Text
D34725.id105391.diff (685 B)
Attached To
Mode
D34725: linux(4): microoptimize bsd_to_linux_sockaddr().
Attached
Detach File
Event Timeline
Log In to Comment