diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-03-29 13:56:59 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-03-29 13:56:59 +0000 |
commit | 35030a5dd4d434af4975c0948c93ce3842fa3809 (patch) | |
tree | e39a5d4590b1ea3e68ff1a7bfa905eb2d62f10bf /sys/rpc | |
parent | 6c5b1ed4b6ffd62f07d0d3444cdfcc33d49097a4 (diff) | |
download | src-35030a5dd4d434af4975c0948c93ce3842fa3809.tar.gz src-35030a5dd4d434af4975c0948c93ce3842fa3809.zip |
Remove some NULL checks for M_WAITOK allocations.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=297391
Diffstat (limited to 'sys/rpc')
-rw-r--r-- | sys/rpc/rpc_generic.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c index 28aa8494df1e..80d658ddcf43 100644 --- a/sys/rpc/rpc_generic.c +++ b/sys/rpc/rpc_generic.c @@ -390,15 +390,11 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr) } ret = (struct netbuf *)malloc(sizeof *ret, M_RPC, M_WAITOK); - if (ret == NULL) - goto out; switch (af) { case AF_INET: sin = (struct sockaddr_in *)malloc(sizeof *sin, M_RPC, M_WAITOK); - if (sin == NULL) - goto out; memset(sin, 0, sizeof *sin); sin->sin_family = AF_INET; sin->sin_port = htons(port); @@ -415,8 +411,6 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr) case AF_INET6: sin6 = (struct sockaddr_in6 *)malloc(sizeof *sin6, M_RPC, M_WAITOK); - if (sin6 == NULL) - goto out; memset(sin6, 0, sizeof *sin6); sin6->sin6_family = AF_INET6; sin6->sin6_port = htons(port); @@ -433,8 +427,6 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr) case AF_LOCAL: sun = (struct sockaddr_un *)malloc(sizeof *sun, M_RPC, M_WAITOK); - if (sun == NULL) - goto out; memset(sun, 0, sizeof *sun); sun->sun_family = AF_LOCAL; strncpy(sun->sun_path, addrstr, sizeof(sun->sun_path) - 1); |