diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2000-05-12 23:42:06 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2000-05-12 23:42:06 +0000 |
commit | f4100424553accd30e29b2db9af02c59be690e27 (patch) | |
tree | 0381eb8009ea040bcc0e67249923772264558da0 /usr.sbin | |
parent | d47dff9321e1b7fa3f83fab22ad1547f0710cd8c (diff) | |
download | FreeBSD-src-f4100424553accd30e29b2db9af02c59be690e27.zip FreeBSD-src-f4100424553accd30e29b2db9af02c59be690e27.tar.gz |
Add a comment to deconfuse a few lines of code I've tripped over two
times now.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/usbd/usbd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/usbd/usbd.c b/usr.sbin/usbd/usbd.c index b866eca..06e7637 100644 --- a/usr.sbin/usbd/usbd.c +++ b/usr.sbin/usbd/usbd.c @@ -702,7 +702,12 @@ find_action(struct usb_device_info *devinfo, action_match_t *action_match) (action->devname == WILDCARD_STRING || (match = match_devname(action, devinfo)) != -1)) { /* found match !*/ - if (match != -1) + + /* Find a devname for pretty printing. Either + * the matched one or otherwise, if there is only + * one devname for that device, use that. + */ + if (match >= 0) devname = devinfo->devnames[match]; else if (devinfo->devnames[0][0] != '\0' && devinfo->devnames[1][0] == '\0') |