apps/examples/can: Fix usage of new number-of-messages command line option

This commit is contained in:
Gregory Nutt 2015-08-17 11:57:25 -06:00
parent 64e1548bb7
commit 546450cc92

View File

@ -164,6 +164,7 @@ int can_main(int argc, char *argv[])
int option;
int fd;
int errval = 0;
int msgno;
int ret;
int i;
@ -305,7 +306,7 @@ int can_main(int argc, char *argv[])
msgdata = 0;
#endif
for (nmsgs = 0; nmsgs < CONFIG_EXAMPLES_CAN_NMSGS; nmsgs++)
for (msgno = 0; msgno < nmsgs; msgno++)
{
/* Flush any output before the loop entered or from the previous pass
* through the loop.