From 9d4f3c82a2d3b11bac038a9bab6fe911cb268b20 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Mon, 9 Mar 2026 12:21:33 +0100 Subject: [PATCH] canerrsim: add missing \n at end of error messages --- canerrsim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/canerrsim.c b/canerrsim.c index 8c6caf3..60055dd 100644 --- a/canerrsim.c +++ b/canerrsim.c @@ -535,7 +535,7 @@ int main(int argc, char *argv[]) // create socket if ((sock = socket(PF_CAN, SOCK_RAW, CAN_RAW)) < 0) - err_exit("Error while opening socket"); + err_exit("Error while opening socket\n"); // set interface name strcpy(ifr.ifr_name, argv[1]); // can0, vcan0... @@ -546,11 +546,11 @@ int main(int argc, char *argv[]) addr.can_family = AF_CAN; addr.can_ifindex = ifr.ifr_ifindex; if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) - err_exit("Error in socket bind"); + err_exit("Error in socket bind\n"); // Send CAN error frame if (write(sock, &frame, sizeof(frame)) < 0) - err_exit("Error writing to socket"); + err_exit("Error writing to socket\n"); else printf("CAN error frame sent\n");