summaryrefslogtreecommitdiff
path: root/device_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'device_info.c')
-rw-r--r--device_info.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/device_info.c b/device_info.c
index c89c080..3385d6e 100644
--- a/device_info.c
+++ b/device_info.c
@@ -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;