j1939acd: fix unused variable warning
open_socket() has a parameter to provide a network device name which is properly assigned by its callers to s.intf in main(). Instead of using the callers value open_socket() directly accesses the global s.intf which generates an unused variable warning with clang. Fix this by using the provided parameter (no functional change). Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>pull/221/head
parent
62f995601e
commit
85ae5aaecf
|
|
@ -200,7 +200,7 @@ static int open_socket(const char *device, uint64_t name)
|
|||
.addr = J1939_IDLE_ADDR,
|
||||
.pgn = J1939_NO_PGN,
|
||||
},
|
||||
.can_ifindex = if_nametoindex(s.intf),
|
||||
.can_ifindex = if_nametoindex(device),
|
||||
};
|
||||
|
||||
if (s.verbose)
|
||||
|
|
|
|||
Loading…
Reference in New Issue