cangen: mark setsockopt() options as const
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>pull/386/head
parent
1f96d674c0
commit
29b05de39d
4
cangen.c
4
cangen.c
|
|
@ -336,14 +336,14 @@ int main(int argc, char **argv)
|
||||||
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0);
|
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0);
|
||||||
|
|
||||||
if (loopback_disable) {
|
if (loopback_disable) {
|
||||||
int loopback = 0;
|
const int loopback = 0;
|
||||||
|
|
||||||
setsockopt(s, SOL_CAN_RAW, CAN_RAW_LOOPBACK,
|
setsockopt(s, SOL_CAN_RAW, CAN_RAW_LOOPBACK,
|
||||||
&loopback, sizeof(loopback));
|
&loopback, sizeof(loopback));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canfd) {
|
if (canfd) {
|
||||||
int enable_canfd = 1;
|
const int enable_canfd = 1;
|
||||||
|
|
||||||
/* check if the frame fits into the CAN netdevice */
|
/* check if the frame fits into the CAN netdevice */
|
||||||
if (ioctl(s, SIOCGIFMTU, &ifr) < 0) {
|
if (ioctl(s, SIOCGIFMTU, &ifr) < 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue