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

Commit 2c361dd1 authored by Neil Fuller's avatar Neil Fuller Committed by android-build-merger
Browse files

Merge "Remove unnecessary casts" am: 6c22b3fd

am: 51b4202e

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