cangen.c: fix formatting

pull/201/head
Rasmus Pedersen 2020-05-05 08:37:42 +02:00
parent e03fd06abe
commit 4acc74cbcf
1 changed files with 6 additions and 2 deletions

View File

@ -441,6 +441,7 @@ int main(int argc, char **argv)
else
fprint_canframe(stdout, &frame, "\n", 1, maxdlen);
}
resend:
nbytes = write(s, &frame, mtu);
if (nbytes < 0) {
@ -466,11 +467,14 @@ resend:
fprintf(stderr, "write: incomplete CAN frame\n");
return 1;
}
burst_sent_count++;
if (gap && burst_sent_count >= burst_count) /* gap == 0 => performance test :-] */
if (nanosleep(&ts, NULL)) return 1;
if (nanosleep(&ts, NULL))
return 1;
if(burst_sent_count >= burst_count) burst_sent_count = 0;
if (burst_sent_count >= burst_count)
burst_sent_count = 0;
if (id_mode == MODE_INCREMENT)
frame.can_id++;