summaryrefslogtreecommitdiffstats
path: root/candump.c
diff options
context:
space:
mode:
Diffstat (limited to 'candump.c')
-rw-r--r--candump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/candump.c b/candump.c
index 7fef4d6..797746e 100644
--- a/candump.c
+++ b/candump.c
@@ -46,15 +46,15 @@ int main(int argc, char **argv)
while ((opt = getopt(argc, argv, "f:t:p:m:v:")) != -1) {
switch (opt) {
case 'f':
- family = atoi(optarg);
+ family = strtoul(optarg, NULL, 0);
break;
case 't':
- type = atoi(optarg);
+ type = strtoul(optarg, NULL, 0);
break;
case 'p':
- proto = atoi(optarg);
+ proto = strtoul(optarg, NULL, 0);
break;
case '?':
@@ -109,5 +109,5 @@ int main(int argc, char **argv)
}
}
- return 0;
+ exit (EXIT_SUCCESS);
}