summaryrefslogtreecommitdiffstats
path: root/src/hid_netbsd.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/hid_netbsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hid_netbsd.c b/src/hid_netbsd.c
index d5b9fad..df85282 100644
--- a/src/hid_netbsd.c
+++ b/src/hid_netbsd.c
@@ -127,14 +127,14 @@ fido_hid_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen)
char path[64];
size_t i;
+ if (devlist == NULL || olen == NULL)
+ return (FIDO_ERR_INVALID_ARGUMENT);
+
*olen = 0;
if (ilen == 0)
return (FIDO_OK); /* nothing to do */
- if (devlist == NULL || olen == NULL)
- return (FIDO_ERR_INVALID_ARGUMENT);
-
for (i = *olen = 0; i < MAX_UHID && *olen < ilen; i++) {
snprintf(path, sizeof(path), "/dev/uhid%zu", i);
if (copy_info(&devlist[*olen], path) == 0) {