cangen: mark setsockopt() options as const

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
pull/386/head
Marc Kleine-Budde 2022-03-27 14:01:05 +02:00
parent 1f96d674c0
commit 29b05de39d
1 changed files with 2 additions and 2 deletions

View File

@ -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) {