Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144365207
D34725.id104418.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
715 B
Referenced Files
None
Subscribers
None
D34725.id104418.diff
View Options
Index: sys/compat/linux/linux.c
===================================================================
--- sys/compat/linux/linux.c
+++ 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
Mon, Feb 9, 1:46 AM (20 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28523182
Default Alt Text
D34725.id104418.diff (715 B)
Attached To
Mode
D34725: linux(4): microoptimize bsd_to_linux_sockaddr().
Attached
Detach File
Event Timeline
Log In to Comment