mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
jcat: make sure we can use decimal numbers for repeat parameter
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
This commit is contained in:
@@ -48,7 +48,7 @@ struct jcat_priv {
|
|||||||
int infile;
|
int infile;
|
||||||
int outfile;
|
int outfile;
|
||||||
size_t max_transfer;
|
size_t max_transfer;
|
||||||
int repeat;
|
unsigned long repeat;
|
||||||
int todo_prio;
|
int todo_prio;
|
||||||
|
|
||||||
bool valid_peername;
|
bool valid_peername;
|
||||||
@@ -605,7 +605,7 @@ static int jcat_parse_args(struct jcat_priv *priv, int argc, char *argv[])
|
|||||||
priv->todo_connect = 1;
|
priv->todo_connect = 1;
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
priv->repeat = atoi(optarg);
|
priv->repeat = strtoul(optarg, NULL, 0);
|
||||||
if (priv->repeat < 1)
|
if (priv->repeat < 1)
|
||||||
err(EXIT_FAILURE, "send/repeat count can't be less then 1\n");
|
err(EXIT_FAILURE, "send/repeat count can't be less then 1\n");
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user