libsocket: Avoid an unnecessary else branch
[nivanova/samba-autobuild/.git] / source4 / lib / socket / socket_ip.c
index 87b7bf4911d1171b96278cde61ecffaea553494a..e0aa5da07cb8f56e0755b1c76817fe654054d691 100644 (file)
@@ -316,7 +316,8 @@ static NTSTATUS ipv4_recvfrom(struct socket_context *sock, void *buf,
        if (gotlen == 0) {
                talloc_free(src);
                return NT_STATUS_END_OF_FILE;
-       } else if (gotlen == -1) {
+       }
+       if (gotlen == -1) {
                talloc_free(src);
                return map_nt_error_from_unix_common(errno);
        }