Commit cff440a9 authored by Marc Schink's avatar Marc Schink

Use jaylink_parse_serial_number()

parent e7c5a2c0
......@@ -126,7 +126,9 @@ int main(int argc, char **argv)
use_serial_number = false;
if (argc > 1) {
if (sscanf(argv[1], "%" PRIu32, &serial_number) != 1) {
ret = jaylink_parse_serial_number(argv[1], &serial_number);
if (ret != JAYLINK_OK) {
printf("Failed to parse serial number: %s.\n",
argv[1]);
return EXIT_FAILURE;
......
......@@ -85,7 +85,9 @@ int main(int argc, char **argv)
use_serial_number = false;
if (argc > 2) {
if (sscanf(argv[2], "%" PRIu32, &serial_number) != 1) {
ret = jaylink_parse_serial_number(argv[2], &serial_number);
if (ret != JAYLINK_OK) {
printf("Failed to parse serial number: %s.\n",
argv[2]);
return EXIT_FAILURE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment