Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c22b3fd authored by Neil Fuller's avatar Neil Fuller Committed by Gerrit Code Review
Browse files

Merge "Remove unnecessary casts"

parents 91ef22f9 daa8a6c6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -476,8 +476,7 @@ public class ApfFilter {
                installNewProgramLocked();
            }
            socket = Os.socket(AF_PACKET, SOCK_RAW, ETH_P_IPV6);
            SocketAddress addr = makePacketSocketAddress(
                    (short) ETH_P_IPV6, mInterfaceParams.index);
            SocketAddress addr = makePacketSocketAddress(ETH_P_IPV6, mInterfaceParams.index);
            Os.bind(socket, addr);
            NetworkStackUtils.attachRaFilter(socket, mApfCapabilities.apfPacketFormat);
        } catch(SocketException|ErrnoException e) {
+1 −1
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ public class DhcpClient extends StateMachine {
    private boolean initPacketSocket() {
        try {
            mPacketSock = Os.socket(AF_PACKET, SOCK_RAW, ETH_P_IP);
            SocketAddress addr = makePacketSocketAddress((short) ETH_P_IP, mIface.index);
            SocketAddress addr = makePacketSocketAddress(ETH_P_IP, mIface.index);
            Os.bind(mPacketSock, addr);
            NetworkStackUtils.attachDhcpFilter(mPacketSock);
        } catch(SocketException|ErrnoException e) {
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ public class ConnectivityPacketTracker {
            try {
                s = Os.socket(AF_PACKET, SOCK_RAW | SOCK_NONBLOCK, 0);
                NetworkStackUtils.attachControlPacketFilter(s, ARPHRD_ETHER);
                Os.bind(s, makePacketSocketAddress((short) ETH_P_ALL, mInterface.index));
                Os.bind(s, makePacketSocketAddress(ETH_P_ALL, mInterface.index));
            } catch (ErrnoException | IOException e) {
                logError("Failed to create packet tracking socket: ", e);
                closeFd(s);