mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-06 06:49:53 +02:00
slcan_attach: remove trailing whitespace
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
+3
-3
@@ -213,7 +213,7 @@ int main(int argc, char **argv)
|
|||||||
/* try to rename the created device if requested */
|
/* try to rename the created device if requested */
|
||||||
if (name) {
|
if (name) {
|
||||||
int s = socket(PF_INET, SOCK_DGRAM, 0);
|
int s = socket(PF_INET, SOCK_DGRAM, 0);
|
||||||
|
|
||||||
printf("rename netdevice %s to %s ... ", buf, name);
|
printf("rename netdevice %s to %s ... ", buf, name);
|
||||||
|
|
||||||
if (s < 0)
|
if (s < 0)
|
||||||
@@ -222,12 +222,12 @@ int main(int argc, char **argv)
|
|||||||
/* current slcan%d name is still in ifr.ifr_name */
|
/* current slcan%d name is still in ifr.ifr_name */
|
||||||
memset (ifr.ifr_newname, 0, sizeof(ifr.ifr_newname));
|
memset (ifr.ifr_newname, 0, sizeof(ifr.ifr_newname));
|
||||||
strncpy (ifr.ifr_newname, name, sizeof(ifr.ifr_newname) - 1);
|
strncpy (ifr.ifr_newname, name, sizeof(ifr.ifr_newname) - 1);
|
||||||
|
|
||||||
if (ioctl(s, SIOCSIFNAME, &ifr) < 0)
|
if (ioctl(s, SIOCSIFNAME, &ifr) < 0)
|
||||||
printf("failed!\n");
|
printf("failed!\n");
|
||||||
else
|
else
|
||||||
printf("ok.\n");
|
printf("ok.\n");
|
||||||
|
|
||||||
close(s);
|
close(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user