From ea6820ed5138f7b0d42c14ae86319c76da8c3552 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 21 Jan 2019 15:26:56 +0100 Subject: [PATCH] lib: Better docs for no devices case in fp_discover_devs() Document the behaviour of fp_discover_devs() when there are no supported devices, rather than errors listing the devices. --- libfprint/fpi-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libfprint/fpi-core.c b/libfprint/fpi-core.c index 2b5d3c6..7a93a1b 100644 --- a/libfprint/fpi-core.c +++ b/libfprint/fpi-core.c @@ -270,10 +270,12 @@ static struct fp_dscv_dev *discover_dev(libusb_device *udev) * fp_discover_devs: * * Scans the system and returns a list of discovered devices. This is your - * entry point into finding a fingerprint reader to operate. + * entry point into finding a fingerprint reader to operate. Note that %NULL + * is only returned on error. When there are no supported readers available, + * an empty list is returned instead. * - * Returns: a nul-terminated list of discovered devices. Must be freed with - * fp_dscv_devs_free() after use. + * Returns: a nul-terminated list of discovered devices or %NULL on error. + * Must be freed with fp_dscv_devs_free() after use. */ API_EXPORTED struct fp_dscv_dev **fp_discover_devs(void) {