cangen: convert towards kernel coding style
parent
697901f9ef
commit
f73ad6a613
5
cangen.c
5
cangen.c
|
|
@ -324,7 +324,7 @@ static int do_send_one(int fd, void *buf, size_t len, int timeout)
|
||||||
memcpy(CMSG_DATA(cm), &tdeliver, sizeof(tdeliver));
|
memcpy(CMSG_DATA(cm), &tdeliver, sizeof(tdeliver));
|
||||||
}
|
}
|
||||||
|
|
||||||
resend:
|
resend:
|
||||||
nbytes = sendmsg(fd, &msg, 0);
|
nbytes = sendmsg(fd, &msg, 0);
|
||||||
if (nbytes < 0) {
|
if (nbytes < 0) {
|
||||||
ret = -errno;
|
ret = -errno;
|
||||||
|
|
@ -460,7 +460,7 @@ int main(int argc, char **argv)
|
||||||
int incdlc = 0;
|
int incdlc = 0;
|
||||||
unsigned long rnd;
|
unsigned long rnd;
|
||||||
unsigned char fixdata[CANFD_MAX_DLEN];
|
unsigned char fixdata[CANFD_MAX_DLEN];
|
||||||
unsigned char rand_position[CANFD_MAX_DLEN] = {0};
|
unsigned char rand_position[CANFD_MAX_DLEN] = { 0 };
|
||||||
|
|
||||||
int opt;
|
int opt;
|
||||||
int s; /* socket */
|
int s; /* socket */
|
||||||
|
|
@ -490,7 +490,6 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
while ((opt = getopt_long(argc, argv, "g:atefbER8mI:L:D:p:n:ixc:vh?", long_options, NULL)) != -1) {
|
while ((opt = getopt_long(argc, argv, "g:atefbER8mI:L:D:p:n:ixc:vh?", long_options, NULL)) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
|
|
||||||
case 'g':
|
case 'g':
|
||||||
gap = strtod(optarg, NULL);
|
gap = strtod(optarg, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue